TanStack Pacer version#
@tanstack/pacer 0.20.1 (current latest)
Framework/Library version#
Node 24
Describe the bug and the steps to reproduce it#
AsyncQueuer silently drops falsy queue items. Values like 0, "", false, and null are accepted into the queue via addItem(), but they are never processed by the #tick() loop.
Root Cause#
In packages/pacer/src/async-queuer.ts, the #tick() method uses a falsy check when peeking at the next item:
const nextItem = this.peekNextItem()
if (!nextItem) {
break
}
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)#
https://stackblitz.com/edit/stackblitz-starters-uqnwpqze?file=index.js
Screenshots or Videos (Optional)#
No response
Do you intend to try to help solve this bug with your own PR?#
Yes, I am also opening a PR that solves the problem along side this issue
Terms & Code of Conduct#