fix: unsafely accessing draggingElement (#5216)
This commit is contained in:
parent
07ebd7c68c
commit
4a9fac2d1e
@ -4432,7 +4432,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
}),
|
}),
|
||||||
selectedElementIds: {
|
selectedElementIds: {
|
||||||
...prevState.selectedElementIds,
|
...prevState.selectedElementIds,
|
||||||
[this.state.draggingElement!.id]: true,
|
[draggingElement.id]: true,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
@ -4440,7 +4440,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
draggingElement: null,
|
draggingElement: null,
|
||||||
selectedElementIds: {
|
selectedElementIds: {
|
||||||
...prevState.selectedElementIds,
|
...prevState.selectedElementIds,
|
||||||
[this.state.draggingElement!.id]: true,
|
[draggingElement.id]: true,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user