When using the code
while (r.hasNext) {
r = await r.next();
console.log("r next", r)
console.log("r.hasNext()", r.hasNext())
items = items.concat(r.items);
}
hasNext() is constantly returning true, even when r._hasNext shows as false causing the code to get stuck in a loop.
You can see in the object r. _hasNext is false, but the console log of r.hasNext() at the bottom is returning true