Sync watchers break subsequent updates #12045
Labels
❗ p4-important
Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
regression
scope: reactivity
Vue version
3.5.9
Link to minimal reproduction
https://play.vuejs.org/#eNqFUklP6zAQ/isjX1pElD7gvcOr0opFHOAAiOWEEQpm2gYc2/JSiqL8d8axAkFiudnfMvPN2A07MCZfB2RTVjhhK+PBoQ9mzlVVG209NGBxkcFL6cUKWlhYXcOIHCOuuBJaOQ9CB+V3YBaV4z9bn+DdAcxVV2Wc9BmMt2A2h4YrIK1yWmIu9XI8cq9KjEgf4VgiX5cy4PY2V21GeRYyuBVMkwzaQeHbvnLy3X3fwliEndhjaP8tVzTt9qZikvZFm6KLx9rI0iPdAJqmX0nbQvEQvNcK9oWsxPOMs0TRNGx+Y4pJoslXTAZFWMa8o+aLapk/Oa3ofbo80V6bSqI9N76icJxNU9LIlVLql9MO8zZg1uNiheL5C/zJbSLG2YVFh3aNnL1zvrRL9Ik+vjrDDZ3fyVo/BknqH8hLpMWFmDHJDoN6pNgDXZf2pPtllVpeu+ONR+X6oWLQqGw7PWf05Y5+GP0j7l7+t/PRM9EW79doY01a4F7+L//P2jcwdvkP
Steps to reproduce
Just click the button.
What is expected?
All the watchers should log and rendering should update.
What is actually happening?
The first two watchers log, but everything after that stops reacting.
System Info
No response
Any additional comments?
I believe this is caused by 10ff159. The reproduction works correctly in 3.5.8.
The
NOTIFIED
flags all get cleared up front inendBatch()
. Thesync
watcher notifies subscribers that are already in the running batch, leading to thenext
flag being incorrectly reset. The subscribers linked via the originalnext
value are never run.The text was updated successfully, but these errors were encountered: