File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export default function createDevToolsStore(onDispatch) {
77 currentStateIndex : 0
88 } ;
99 let listeners = [ ] ;
10+ let initiated = false ;
1011
1112 function dispatch ( action ) {
1213 if ( action . type [ 0 ] !== '@' ) onDispatch ( action ) ;
@@ -17,9 +18,14 @@ export default function createDevToolsStore(onDispatch) {
1718 return currentState ;
1819 }
1920
21+ function isSet ( ) {
22+ return initiated ;
23+ }
24+
2025 function setState ( state ) {
2126 currentState = state ;
2227 listeners . forEach ( listener => listener ( ) ) ;
28+ initiated = true ;
2329 }
2430
2531 function subscribe ( listener ) {
@@ -39,7 +45,8 @@ export default function createDevToolsStore(onDispatch) {
3945 dispatch,
4046 getState,
4147 setState,
42- subscribe
48+ subscribe,
49+ isSet
4350 }
4451 } ;
4552}
You can’t perform that action at this time.
0 commit comments