Sfoglia il codice sorgente

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

Jed Fox 5 anni fa
parent
commit
8ecb4201db
1 ha cambiato i file con 4 aggiunte e 6 eliminazioni
  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();