diff --git a/src/components/composer/common/OptionEditor.vue b/src/components/composer/common/OptionEditor.vue index 30ebb8d..4e5b58c 100644 --- a/src/components/composer/common/OptionEditor.vue +++ b/src/components/composer/common/OptionEditor.vue @@ -57,12 +57,13 @@ export default defineComponent({ }, computed: { localObject() { - return this.modelValue; + return this.modelValue || {}; }, }, methods: { updateOption(key, value) { - this.$emit("update:modelValue", { ...this.localObject, [key]: value }); + const newValue = { ...this.localObject, [key]: value }; + this.$emit("update:modelValue", newValue); }, getColumnStyle(width = 12) { if (width === "auto") { @@ -82,6 +83,12 @@ export default defineComponent({ return ["q-input", "q-select"].includes(config.component) && config.icon; }, }, + created() { + // Initialize with empty object if modelValue is null/undefined + if (!this.modelValue) { + this.$emit("update:modelValue", {}); + } + }, });