Open ndreckshage opened 6 years ago
@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.
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 ofdefine
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
immutableInit
inside define, fixing race condition.master
spec's don't pass in CI.