Przeglądaj źródła

fix(reset): check for store before resetting

Ryan Chandler 4 lat temu
rodzic
commit
667fc71c67

Plik diff jest za duży
+ 0 - 0
dist/spruce.js


Plik diff jest za duży
+ 0 - 0
dist/spruce.js.map


Plik diff jest za duży
+ 0 - 0
dist/spruce.module.js


Plik diff jest za duży
+ 0 - 0
dist/spruce.module.js.map


Plik diff jest za duży
+ 0 - 0
dist/spruce.umd.js


Plik diff jest za duży
+ 0 - 0
dist/spruce.umd.js.map


+ 4 - 0
src/index.js

@@ -114,6 +114,10 @@ const Spruce = {
     },
     },
 
 
     reset(name, state) {
     reset(name, state) {
+        if (! this.stores[name]) {
+            return;
+        }
+        
         this.stores[name] = state
         this.stores[name] = state
     },
     },
 
 

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików