-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[...Array(5).keys()] not working in Android #18426
Comments
Thanks for posting this! It looks like your issue may be missing some necessary information. Can you run Thank you for your contributions. |
Seems like a JavaScriptCore issue (this is the JavaScript engine used by React Native). As a point of comparison, using V8 we get identical results:
IIRC, we use a fork of the JSC on Android which diverged from what iOS provides. |
I also found this problem on Android.
![screenshot](https://user-images.githubusercontent.com/4032276/37819555-718a2476-2eb0-11e8-85d9-11b6b3ae2bfd.gif)
PS. iOS always work
|
You're using a different JavaScript engine when remote JS debugging is turned on - possibly Chrome's (V8). |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
still not fixed. |
Workaround: Array(5).fill().map((_, index) => index) |
Workaround by @sonaye works properly, but issue is still not fixed. |
Still not fixed in 0.57 |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
not yet fixed |
Not yet fixed. still happens when remote debugging turned off. |
The JSC in Android was updated in December, it's in master. The new JSC will be part of the 0.59 release. Can you verify on master and let us know if it's still an issue? |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
OS: macOS Sierra 10.12.6
Node: 9.8.0
Yarn: 1.5.1
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.2
react-native: 0.54.2 => 0.54.2
Steps to Reproduce
console.log([...Array(2).keys()])
does not produce[0, 1]
.Additional note: both works on iOS.
Expected Behavior
https://snack.expo.io/H1elODwPb should render data on screen
Actual Behavior
https://snack.expo.io/H1elODwPb renders nothing on screen
Reproducible Demo
see above
The text was updated successfully, but these errors were encountered: