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

Set.size is broken on ReactNative for Android #297

Closed
gusbicalho opened this issue Apr 26, 2017 · 1 comment
Closed

Set.size is broken on ReactNative for Android #297

gusbicalho opened this issue Apr 26, 2017 · 1 comment
Labels

Comments

@gusbicalho
Copy link

gusbicalho commented Apr 26, 2017

Description

When running a ReactNative app on Android, a Set from core-js always return an undefined size, while the native Set implementation works fine.

The problem does not show up when debugging the Android app I think this is because in debug mode the JS code runs in the Chrome debugger (V8), while normally it runs in the JavaScriptCore engine.

The problem also does not show up when running on iOS simulator, which suggests it's some compatibility issue with the specific implementation of JavaScriptCore used on Android. I wasn't able to test on a real iOS device.

Running tests with jest (which runs on Node) also shows no problem.

Steps to reproduce:

@gusbicalho
Copy link
Author

Found the cause:
The base Set implementation in ReactNative#android defines set as a property of each Set object, instead of defining it on the prototype, so this check https://github.com/zloirock/core-js/blob/master/library/modules/_collection.js#L44 fails.

Not sure how to fix that, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants