Skip to content

fix: clamp for-loop continuation cursor after a negative offset - #2139

Open
nagibatorz wants to merge 2 commits into
Shopify:mainfrom
nagibatorz:nagibatorz/offset-continue-negative-offset-2132
Open

nagibatorz wants to merge 2 commits into
Shopify:mainfrom
nagibatorz:nagibatorz/offset-continue-negative-offset-2132

Conversation

@nagibatorz

Copy link
Copy Markdown

Fixes #2132. offset: continue after a negative offset resumes from a different item than on shopify.dev. The slice is already clamped to the collection start, so a negative offset rendered from item 1, but the continuation cursor went negative and offset: continue replayed items. Now the cursor is clamped to 0 before adding the segment length. Validation: repro fails on clean base and passes with the fix; full suite 1063 runs, 2536 assertions, 0 failures.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

offset: continue after a negative offset resumes from a different item than on shopify.dev

1 participant