Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

Commit a6ebae0

Browse files
boris-graeffBoris Graeff
authored andcommitted
Handle dynamically registered modules (#225)
Co-authored-by: Boris Graeff <boris@viibe.co>
1 parent ac20b27 commit a6ebae0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ export default function(options, storage, key) {
5252
throw new Error('Invalid storage instance given');
5353
}
5454

55+
const savedState = shvl.get(options, 'getState', getState)(key, storage);
56+
5557
return function(store) {
56-
const savedState = shvl.get(options, 'getState', getState)(key, storage);
5758

5859
if (typeof savedState === 'object' && savedState !== null) {
5960
store.replaceState(merge(store.state, savedState, {

0 commit comments

Comments
 (0)