Skip to content

Commit e31f9a1

Browse files
Clear current listeners on store unsubscribe.
1 parent 86d405b commit e31f9a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/createStore.js

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export default function createStore(reducer, preloadedState, enhancer) {
152152
ensureCanMutateNextListeners()
153153
const index = nextListeners.indexOf(listener)
154154
nextListeners.splice(index, 1)
155+
currentListeners = null
155156
}
156157
}
157158

0 commit comments

Comments
 (0)