Bug with query.hasNext()

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

Try
while (r.hasNext())…

Sorry, mistyped in example above but you can see in the console log that it was r.hasNext()

I agree, it looks like a bug has been introduced into hasNext(). I have similar coding which has been working correctly for over two years, and it suddenly failed last Friday 30 June, with the inevitable “Too Many Requests”. A work-around using a limit on the number of times round the loop has got it working again.