Fix issue where ending a stream in the middle of a stream callback would result in erroneous parent stream state for the rest of that emit.
This commit is contained in:
parent
cf7a841c4c
commit
31d1df5caa
3 changed files with 40 additions and 1 deletions
|
|
@ -29,7 +29,11 @@ function Stream(value) {
|
|||
if (open(stream)) {
|
||||
stream._changing()
|
||||
stream._state = "active"
|
||||
dependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })
|
||||
// Cloning the list to ensure it's still iterated in intended
|
||||
// order
|
||||
dependentStreams.slice().forEach(function(s, i) {
|
||||
if (open(s)) s(this[i](value))
|
||||
}, dependentFns.slice())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue