We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae9e163 commit 5845feeCopy full SHA for 5845fee
src/Bacon.coffee
@@ -1417,6 +1417,7 @@ UpdateBarrier = (->
1417
waiterObs = []
1418
waiters = {}
1419
afters = []
1420
+ aftersIndex = 0
1421
1422
afterTransaction = (f) ->
1423
if rootEvent
@@ -1471,8 +1472,12 @@ UpdateBarrier = (->
1471
1472
#console.log("done with tx")
1473
flush()
1474
rootEvent = undefined
- while (afters.length > 0)
1475
- afters.shift()()
+ while (aftersIndex < afters.length)
1476
+ after = afters[aftersIndex]
1477
+ aftersIndex++
1478
+ after()
1479
1480
+ afters = []
1481
result
1482
1483
currentEventId = -> if rootEvent then rootEvent.id else undefined
0 commit comments