From 55d3287abfca7938ac9f1a66fed30f404eedfd9d Mon Sep 17 00:00:00 2001 From: David Luzar Date: Mon, 5 Jul 2021 13:43:53 +0200 Subject: [PATCH] fix: include deleted elements when passing to restore (#3802) --- src/components/App.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 07e14046..8f0b2688 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -655,7 +655,11 @@ class App extends React.Component { const fileHandle = launchParams.files[0]; const blob: Blob = await fileHandle.getFile(); blob.handle = fileHandle; - loadFromBlob(blob, this.state, this.scene.getElements()) + loadFromBlob( + blob, + this.state, + this.scene.getElementsIncludingDeleted(), + ) .then(({ elements, appState }) => this.syncActionResult({ elements, @@ -3814,7 +3818,7 @@ class App extends React.Component { const { elements, appState } = await loadFromBlob( file, this.state, - this.scene.getElements(), + this.scene.getElementsIncludingDeleted(), ); this.syncActionResult({ elements, @@ -3875,7 +3879,7 @@ class App extends React.Component { }; loadFileToCanvas = (file: Blob) => { - loadFromBlob(file, this.state, this.scene.getElements()) + loadFromBlob(file, this.state, this.scene.getElementsIncludingDeleted()) .then(({ elements, appState }) => this.syncActionResult({ elements,