Fix #1714 conditionally halting stream (#2200)

* Fix #1714 conditionally halting stream

* Add note in changelog
This commit is contained in:
Rasmus Porsager 2018-08-08 16:06:21 +02:00 committed by Barney Carroll
parent 4d0047380c
commit d64e0a950f
3 changed files with 23 additions and 1 deletions

View file

@ -53,7 +53,7 @@ function updateDependency(stream, mustSync) {
var state = stream._state, parents = state.parents
if (parents.length > 0 && parents.every(active) && (mustSync || parents.some(changed))) {
var value = stream._state.derive()
if (value === HALT) return false
if (value === HALT) return unregisterStream(stream)
updateState(stream, value)
}
}