Skip to content

Commit 8ad1139

Browse files
committed
feat/chat-options-configurator
1 parent 7c92728 commit 8ad1139

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

packages/configurator/src/object-depth-configurator/ObjectDepthConfigurator.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,20 @@ export default {
2626
props: {
2727
meta: {
2828
type: Object,
29-
default: () => {}
29+
default: () => ({})
3030
}
3131
},
3232
emits: ['update:modelValue'],
3333
setup(props, { emit }) {
3434
const properties = computed(() => {
35-
const result = props.meta?.properties?.[0]?.content || []
35+
const result = [...(props.meta?.properties?.[0]?.content || [])]
3636
const propsModelValue = props.meta.widget.props?.modelValue
3737
3838
if (result.length && propsModelValue) {
3939
result.forEach((item) => {
4040
const modelValue = propsModelValue
4141
const model_value_property = modelValue[item.property]
42-
item.widget.props.modelValue =
43-
typeof model_value_property === 'boolean' ? model_value_property : model_value_property || null
42+
item.widget.props.modelValue = typeof model_value_property === 'undefined' ? null : model_value_property
4443
})
4544
}
4645
return result

0 commit comments

Comments
 (0)