Skip to content

Commit

Permalink
Clear current listeners on store unsubscribe. (#3475)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrysteblyuk authored and timdorr committed Jul 14, 2019
1 parent 86d405b commit f663e5a
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 f663e5a

Please sign in to comment.