Fix the dropped update edge case in @theatre/react

Before this, there was a delay between when a queued microtask is finished, and it being marked as so. If an update was queued in between this delay, it would have been missed.

This wasn't caught until now, because usually in a large react tree, usually there are one or more tickers that flush the queue, so if an update isn't picked up on one flush, it would end up in the next flush.
This commit is contained in:
Aria Minaei 2023-08-02 19:31:39 +02:00
parent e856ee54ff
commit d26db282c6

View file

@ -240,9 +240,9 @@ function queueIfNeeded() {
item.runUpdate() item.runUpdate()
} }
} }
}, 1)
microtaskIsQueued = false microtaskIsQueued = false
}, 1)
}) })
} }
/** /**