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 for AMD & Symbol polyfill race condition #255

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ndreckshage
Copy link

@ndreckshage ndreckshage commented Jun 25, 2018

Issue Summary

There is a race condition when using AMD for older browsers that use a Symbol polyfill. https://github.com/rtfeldman/seamless-immutable/blob/7.1.3/src/seamless-immutable.js#L7 this line detects whether a Symbol polyfill is used. However, immutableInit is called outside of define for AMD (https://github.com/rtfeldman/seamless-immutable/blob/7.1.3/src/seamless-immutable.js#L742).

If a polyfill is in a separate bundle than Seamless, there is a race condition, and if Seamless loads before the polyfill, browsers that use the polyfill crash, because they don't break early on React elements.

Fix

@crudh
Copy link
Collaborator

crudh commented Sep 2, 2018

@ndreckshage looks reasonable. Can you rebase it on current master, or submit a new PR with only your changes? The CI build has been fixed and additional commits were added to it.

And you can either rebuild the conflicting files or leave them out, I will do a build after merging anyway.

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.

3 participants