Procházet zdrojové kódy

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>
vanilla_orig
lissitz před 5 roky
rodič
revize
845484aecc
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4
    1
      src/index.tsx

+ 4
- 1
src/index.tsx Zobrazit soubor

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

Načítá se…
Zrušit
Uložit