Explorar el Código

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

Jed Fox hace 5 años
padre
commit
8ecb4201db
Se han modificado 1 ficheros con 4 adiciones y 6 borrados
  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();