Skip to content

Commit

Permalink
Clear current listeners on store unsubscribe.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrysteblyuk committed Jul 12, 2019
1 parent 86d405b commit e31f9a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/createStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export default function createStore(reducer, preloadedState, enhancer) {
ensureCanMutateNextListeners()
const index = nextListeners.indexOf(listener)
nextListeners.splice(index, 1)
currentListeners = null
}
}

Expand Down

0 comments on commit e31f9a1

Please sign in to comment.