Skip to content

Commit

Permalink
fix: can't save state edit, fix #2140
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 15, 2024
1 parent b799e3d commit 056ce1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/app-frontend/src/features/inspector/StateFields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export default {
},
},
errorCaptured(err, vm) {
errorCaptured(err, vm, info) {
console.error(err, vm, info)
this.fieldErrors[vm.field.key] = err.message
},
Expand Down
4 changes: 2 additions & 2 deletions packages/app-frontend/src/mixins/data-field-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ export default {
submitEdit() {
if (this.editValid) {
this.editing = false
let value = this.customField.skipSerialize ? this.editedValue : this.transformSpecialTokens(this.editedValue, false)
let value = this.customField?.skipSerialize ? this.editedValue : this.transformSpecialTokens(this.editedValue, false)
// We need to send the entire custom value data object
if (this.valueType === 'custom') {
value = JSON.stringify({
_custom: {
...this.customField,
value: this.customField.skipSerialize ? value : JSON.parse(value), // Input
value: this.customField?.skipSerialize ? value : JSON.parse(value), // Input
},
})
}
Expand Down

0 comments on commit 056ce1d

Please sign in to comment.