I know I saw this in here before but

I know I saw this in here before but cant seem to find any resolution to it... I'm currently getting errors saying my cursor is invalid and not sure how to fix 🤔

My code looks like so:
let cursor: string | undefined, complete = false

do {
    const { keys, list_complete, cursor: cur } = await env.Tracking.list<R2LatencyMetadata>({ cursor, prefix: 'TimeSeries/R2' })

    complete = list_complete, cursor = cur

    // Do some things with keys
} while (!complete && cursor)
Was this page helpful?