소스 검색

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();