wrangler |
---|
patch |
fix: prevent infinite loop when fetching a list of results
When fetching a list of results from cloudflare APIs (e.g. when fetching a list of keys in a kv namespace), the api returns a cursor
that a consumer should use to get the next 'page' of results. It appears this cursor can also be a blank string (while we'd only account for it to be undefined
). By only accounting for it to be undefined
, we were infinitely looping through the same page of results and never terminating. This PR fixes it by letting it be a blank string (and null
, for good measure)