1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2025-02-18 13:29:36 +01:00

Fix: refreshing the page while selecting saves the selection ele… (#601)

* Fix: refreshing the page while selecting saves the selection element

Fixes #591.

* fix lint

Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
lissitz 2020-01-28 16:44:34 +01:00 committed by David Luzar
parent 26048ee469
commit 845484aecc

@ -1494,7 +1494,10 @@ export class App extends React.Component<any, AppState> {
}
private saveDebounced = debounce(() => {
saveToLocalStorage(elements, this.state);
saveToLocalStorage(
elements.filter(x => x.type !== "selection"),
this.state,
);
}, 300);
componentDidUpdate() {