From 4a9fac2d1e5c4fac334201ef53c6f5d2b5f6f9f5 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Fri, 20 May 2022 17:48:26 +0200 Subject: [PATCH] fix: unsafely accessing draggingElement (#5216) --- src/components/App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index ec25b129..e430026c 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -4432,7 +4432,7 @@ class App extends React.Component { }), selectedElementIds: { ...prevState.selectedElementIds, - [this.state.draggingElement!.id]: true, + [draggingElement.id]: true, }, })); } else { @@ -4440,7 +4440,7 @@ class App extends React.Component { draggingElement: null, selectedElementIds: { ...prevState.selectedElementIds, - [this.state.draggingElement!.id]: true, + [draggingElement.id]: true, }, })); }