Skip to content

Commit

Permalink
Delete stores on hot reload
Browse files Browse the repository at this point in the history
  • Loading branch information
goatslacker committed Aug 27, 2015
1 parent 582c75b commit 8485eee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/alt/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class Alt {
? store.createStoreFromClass(this, Store, key, ...args)
: store.createStoreFromObject(this, Store, key)

/*istanbul ignore next*/
if (module.hot) delete this.stores[key]

this.stores[key] = storeInstance
StateFunctions.saveInitialSnapshot(this, key)

Expand Down

0 comments on commit 8485eee

Please sign in to comment.