diff --git a/packages/builder/src/stores/backend/tables.js b/packages/builder/src/stores/backend/tables.js index ae29ac2ee1..faecf0d753 100644 --- a/packages/builder/src/stores/backend/tables.js +++ b/packages/builder/src/stores/backend/tables.js @@ -106,8 +106,11 @@ export function createTablesStore() { if (indexes) { state.draft.indexes = indexes } - - state.draft.schema = {...state.draft.schema, [field.name]: cloneDeep(field)} + + state.draft.schema = { + ...state.draft.schema, + [field.name]: cloneDeep(field), + } save(state.draft) return state }) diff --git a/packages/builder/src/stores/backend/views.js b/packages/builder/src/stores/backend/views.js index 4c0d273778..d6497bf871 100644 --- a/packages/builder/src/stores/backend/views.js +++ b/packages/builder/src/stores/backend/views.js @@ -36,8 +36,8 @@ export function createViewsStore() { if (view.originalName) delete viewTable.views[view.originalName] viewTable.views[view.name] = viewMeta await tables.save(viewTable) - - update(state => ({...state, selected: viewMeta})) + + update(state => ({ ...state, selected: viewMeta })) }, } }