From 69d751ffe4f56293f23bfaf1aa077fa5321cb597 Mon Sep 17 00:00:00 2001 From: dwelle Date: Thu, 10 Aug 2023 13:27:23 +0200 Subject: [PATCH] revert debug --- src/components/App.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index cbf922ce0..44649bae1 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -3864,11 +3864,11 @@ class App extends React.Component { // Since we are reading from previous state which is not possible with // automatic batching in React 18 hence using flush sync to synchronously // update the state. Check https://github.com/excalidraw/excalidraw/pull/5508 for more details. - // flushSync(() => { - this.setState({ - editingLinearElement, + flushSync(() => { + this.setState({ + editingLinearElement, + }); }); - // }); } if (editingLinearElement?.lastUncommittedPoint != null) { this.maybeSuggestBindingAtCursor(scenePointer);