-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Description
- [+] Review the documentation: https://facebook.github.io/react-native
- [+] Search for existing issues: https://github.com/facebook/react-native/issues
- [+] Use the latest React Native release: https://github.com/facebook/react-native/releases
Related issues
#15902 #21550 #20902 #18426 #19737
Environment
React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Memory: 2.44 GB / 15.55 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 8.14.0 - /usr/bin/node
Yarn: 1.12.3 - /usr/bin/yarn
npm: 6.4.1 - /usr/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
npmPackages:
react: 16.6.1 => 16.6.1
react-native: 0.57.7 => 0.57.7
Description
JavaScriptCore's Array.keys() object missing Symbol.iterator method.
Reproducible Demo
//Code:
const arr_iterator = Array(10).keys();
const is_iterator = arr_iterator[Symbol.iterator];
const arr = Array.from(arr_iterator);
console.log('typeof arr_iterator[Symbol.iterator]: ' + typeof is_iterator);
console.log('Array.isArray(arr): ' + Array.isArray(arr));
console.log('arr: ' + JSON.stringify(arr));
/*
Logs from android emulator:
12-08 17:27:24.107 31835 32034 I ReactNativeJS: typeof arr_iterator[Symbol.iterator]: undefined
12-08 17:27:24.107 31835 32034 I ReactNativeJS: Array.isArray(arr): true
12-08 17:27:24.107 31835 32034 I ReactNativeJS: arr: []
Logs from Google Chrome console:
App.js:25 typeof arr_iterator[Symbol.iterator]: function
App.js:26 Array.isArray(arr): true
App.js:27 arr: [0,1,2,3,4,5,6,7,8,9]
*/