We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0847a3a commit ba88051Copy full SHA for ba88051
src/reactor/fns.js
@@ -246,7 +246,13 @@ exports.removeObserverByEntry = function(observerState, entry) {
246
map.update('any', anyObsevers => anyObsevers.remove(id))
247
} else {
248
storeDeps.forEach(storeId => {
249
- map.updateIn(['stores', storeId], observers => observers.remove(id))
+ map.updateIn(['stores', storeId], observers => {
250
+ if (observers) {
251
+ // check for observers being present because reactor.reset() can be called before an unwatch fn
252
+ return observers.remove(id)
253
+ }
254
+ return observers
255
+ })
256
})
257
}
258
0 commit comments