Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(mobx): Safer method to consume Iterator.prototype #3943

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

tonyraoul
Copy link
Contributor

@tonyraoul tonyraoul commented Oct 16, 2024

Code change checklist

  • Added/updated unit tests
  • Updated /docs. For new functionality, at least API.md should be updated
  • Verified that there is no significant performance drop (yarn mobx test:performance)

Really sorry, I might have introduced a bug here
thanks @zeldigas for reporting!

Context

For some projects setups, Observablemap.prototype.forEach, ObservableSet.prototype.forEach might throw an error on older browsers and Safari, I am genuinely sorry about this one.

I wrongfully assumed that Iterator.prototype is widely available but that's not the case.

Screenshot 2024-10-16 at 11 01 48 pm

Copy link

changeset-bot bot commented Oct 16, 2024

🦋 Changeset detected

Latest commit: 3d7d76f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
mobx Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tonyraoul tonyraoul force-pushed the fix-map-set-browser-compatability branch from c9879d9 to 176fcb8 Compare October 16, 2024 10:44
@tonyraoul tonyraoul force-pushed the fix-map-set-browser-compatability branch from 176fcb8 to 2398f5a Compare October 16, 2024 10:45
@tonyraoul tonyraoul marked this pull request as ready for review October 16, 2024 10:46
@tonyraoul tonyraoul changed the title Fix browser compatability for map/set Chore(mobx): Fix browser compatability for map/set Oct 16, 2024
@tonyraoul tonyraoul changed the title Chore(mobx): Fix browser compatability for map/set Fix(mobx): Fix browser compatability for map/set Oct 16, 2024
@tonyraoul tonyraoul changed the title Fix(mobx): Fix browser compatability for map/set Fix(mobx): Safer method to use Iterator.prototype Oct 16, 2024
@tonyraoul tonyraoul changed the title Fix(mobx): Safer method to use Iterator.prototype Fix(mobx): Safer method to consume Iterator.prototype Oct 16, 2024
@mweststrate
Copy link
Member

No worries, these things happen in ever changing browser land! Thanks for the quick fix. Up to the next breakage🚀

@mweststrate mweststrate merged commit 4c07773 into mobxjs:main Oct 16, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Oct 16, 2024
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.

2 participants