浏览代码

How could I have gotten this so wrong? (#873)

Jed Fox 5 年之前
父节点
当前提交
8ecb4201db
共有 1 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      src/actions/actionHistory.tsx

+ 4 - 6
src/actions/actionHistory.tsx

@@ -13,12 +13,10 @@ const writeData = (
   updater: () => { elements: ExcalidrawElement[]; appState: AppState } | null,
 ) => {
   if (
-    [
-      appState.multiElement,
-      appState.resizingElement,
-      appState.editingElement,
-      appState.draggingElement,
-    ].some(Boolean)
+    !appState.multiElement &&
+    !appState.resizingElement &&
+    !appState.editingElement &&
+    !appState.draggingElement
   ) {
     const data = updater();