We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
conclude
1 parent b404262 commit 000f832Copy full SHA for 000f832
src/Component.ts
@@ -129,10 +129,12 @@ export default defineComponent({
129
if (newAttrs.onChangeMode) {
130
defaultFunctionAttrs.onChangeMode = onChangeMode
131
}
132
- jsonEditor.value.updateProps(conclude([newAttrs, defaultFunctionAttrs], {
133
- camelCase: false,
134
- mergeFunction,
135
- }))
+ jsonEditor.value.updateProps(Object.getOwnPropertyNames(defaultFunctionAttrs).length > 0
+ ? conclude([newAttrs, defaultFunctionAttrs], {
+ camelCase: false,
+ mergeFunction,
136
+ })
137
+ : newAttrs)
138
}, {
139
deep: true,
140
})
0 commit comments