diff --git a/frontend/src/metadata/store/index.js b/frontend/src/metadata/store/index.js index 3b1af4147f..2685117f8c 100644 --- a/frontend/src/metadata/store/index.js +++ b/frontend/src/metadata/store/index.js @@ -111,10 +111,6 @@ class Store { applyOperation(operation, undoRedoHandler = { handleUndo: true }) { const { op_type } = operation; - if (LOCAL_APPLY_OPERATION_TYPE.includes(op_type)) { - this.localOperator.applyOperation(operation); - } - if (!NEED_APPLY_AFTER_SERVER_OPERATION.includes(op_type)) { this.handleUndoRedos(undoRedoHandler, operation); this.data = deepCopy(operation.apply(this.data)); @@ -122,6 +118,11 @@ class Store { this.context.eventBus.dispatch(EVENT_BUS_TYPE.LOCAL_TABLE_CHANGED); } + if (LOCAL_APPLY_OPERATION_TYPE.includes(op_type)) { + this.localOperator.applyOperation(operation); + return; + } + this.addPendingOperations(operation, undoRedoHandler); }