Skip to content

fix: snapshot the iteration range of optimised array searches - #1334

Open
yuefdev wants to merge 1 commit into
immerjs:mainfrom
yuefdev:fix/array-search-iteration-bounds
Open

yuefdev wants to merge 1 commit into
immerjs:mainfrom
yuefdev:fix/array-search-iteration-bounds

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown

Snapshot the iteration length for the array-methods plugin's find and findLast, matching native array searches.

Once a draft has a copy, a predicate can append or remove entries through the draft. The current loop then searches newly appended values or stops early when the array shrinks.

Three regressions fail with the plugin enabled and pass in the native-mode controls. All 3,377 base tests and the package build pass, including type declarations.

Signed-off-by: Yusuf Efe <120668197+yuefdev@users.noreply.github.com>

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant