Browse Source

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>
pull/602/head
lissitz 6 years ago committed by David Luzar
parent
commit
845484aecc
  1. 5
      src/index.tsx

5
src/index.tsx

@ -1494,7 +1494,10 @@ export class App extends React.Component<any, AppState> { @@ -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() {

Loading…
Cancel
Save