mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: remove invisible elements safely (#7083)
This commit is contained in:
parent
1f4f5e11ae
commit
8b838049df
2 changed files with 6 additions and 2 deletions
|
@ -6549,7 +6549,9 @@ class App extends React.Component<AppProps, AppState> {
|
|||
) {
|
||||
// remove invisible element which was added in onPointerDown
|
||||
this.scene.replaceAllElements(
|
||||
this.scene.getElementsIncludingDeleted().slice(0, -1),
|
||||
this.scene
|
||||
.getElementsIncludingDeleted()
|
||||
.filter((el) => el.id !== draggingElement.id),
|
||||
);
|
||||
this.setState({
|
||||
draggingElement: null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue