Skip to content

Commit 056ce1d

Browse files
committed
fix: can't save state edit, fix #2140
1 parent b799e3d commit 056ce1d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/app-frontend/src/features/inspector/StateFields.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ export default {
6262
},
6363
},
6464
65-
errorCaptured(err, vm) {
65+
errorCaptured(err, vm, info) {
66+
console.error(err, vm, info)
6667
this.fieldErrors[vm.field.key] = err.message
6768
},
6869

packages/app-frontend/src/mixins/data-field-edit.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,13 @@ export default {
204204
submitEdit() {
205205
if (this.editValid) {
206206
this.editing = false
207-
let value = this.customField.skipSerialize ? this.editedValue : this.transformSpecialTokens(this.editedValue, false)
207+
let value = this.customField?.skipSerialize ? this.editedValue : this.transformSpecialTokens(this.editedValue, false)
208208
// We need to send the entire custom value data object
209209
if (this.valueType === 'custom') {
210210
value = JSON.stringify({
211211
_custom: {
212212
...this.customField,
213-
value: this.customField.skipSerialize ? value : JSON.parse(value), // Input
213+
value: this.customField?.skipSerialize ? value : JSON.parse(value), // Input
214214
},
215215
})
216216
}

0 commit comments

Comments
 (0)