Skip to content

fix: improve DraftMap.{entries,values}() compatibility - #1228

Merged
mweststrate merged 1 commit into
immerjs:mainfrom
mrcljx:iterator-fixes
Jul 3, 2026
Merged

fix: improve DraftMap.{entries,values}() compatibility#1228
mweststrate merged 1 commit into
immerjs:mainfrom
mrcljx:iterator-fixes

Conversation

@mrcljx

@mrcljx mrcljx commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

I noticed two issues with draftMap.entries() (and values()):

  • It doesn't support ES2025 features.
  • It doesn't respect the contract that it should return itself for [Symbol.iterator]() but instead returns a new iterator instance (starting from the beginning again).

This PR addresses them both while not adding a hard dependency on ES2025 features.

@mrcljx
mrcljx marked this pull request as ready for review April 7, 2026 12:04
@mrcljx mrcljx changed the title Increase entries/values compatibility fix: improve DraftMap.{entries,values}() compatibility Apr 7, 2026
@mweststrate

Copy link
Copy Markdown
Collaborator

Looking great, thanks for making this contribution!

@mweststrate
mweststrate merged commit 858d036 into immerjs:main Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 11.1.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants