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

Mobx 4.9.1 breaks IE11 compatibility #1878

Closed
Havunen opened this issue Jan 23, 2019 · 11 comments
Closed

Mobx 4.9.1 breaks IE11 compatibility #1878

Havunen opened this issue Jan 23, 2019 · 11 comments
Labels

Comments

@Havunen
Copy link

Havunen commented Jan 23, 2019

Code in question:

    ObservableSet$$1.prototype[Symbol.iterator] = function () {
        return this.values();
    };

Error:
Symbol' is undefined

@Havunen
Copy link
Author

Havunen commented Jan 23, 2019

Mobx 4.8.0 works as expected

@nykula
Copy link
Contributor

nykula commented Jan 23, 2019

Can confirm, this assignment in observableset.ts should check typeof Symbol like observablearray.ts. Personally I polyfill anyway because of array helpers and Fetch API etc, but MobX already has the fallback in a few places so for consistency it can be moved to a constant. @mweststrate please respond whether I should make a pull request or you meant to start removing the fallbacks.

@Havunen
Copy link
Author

Havunen commented Jan 23, 2019

Mobx v4 is documented to be ES5 complaint. So this must be bug

@mweststrate
Copy link
Member

mweststrate commented Jan 23, 2019 via email

@mweststrate
Copy link
Member

@makepost @Havunen should be fixed in 4.9.2. Please let me know if it isn't! (No IE 11 available atm, so couldn't fully reproduce it)

@Havunen
Copy link
Author

Havunen commented Jan 25, 2019

Now it failed to Set is undefined

@Havunen
Copy link
Author

Havunen commented Jan 25, 2019

@mweststrate
Copy link
Member

mweststrate commented Jan 25, 2019 via email

@mweststrate
Copy link
Member

mweststrate commented Jan 25, 2019 via email

@davojan
Copy link

davojan commented Feb 5, 2019

Updating to 4.9.2 has broken my webpack build with typescript error:

ERROR in node_modules/mobx/lib/types/observablemap.d.ts(42,5):
TS2416: Property '[Symbol.toStringTag]' in type 'ObservableMap<K, V>' is not assignable to the same property in base type 'Map<K, V>'.
  Type 'string' is not assignable to type '"Map"'.

Reverting to 4.9.1 fixes this.

@lock
Copy link

lock bot commented Jul 21, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants