Skip to content

Commit 1e95b82

Browse files
author
Amir Tocker
committed
Use traditional array traversing to solve react native issue on Android
Babel implements `for(var a in arr)` Using `Symbol` which is not defined in Android default browser.
1 parent d4ac047 commit 1e95b82

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Util/firstDefined.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* @returns {*}
55
*/
66
export default function firstDefined(...values){
7-
for(let value of values) {
8-
if(value !== undefined) return value;
7+
for(let i = 0; i < values.length; i++) {
8+
if(values[i] !== undefined) return values[i];
99
}
1010
return undefined;
1111
}

src/components/CloudinaryComponent/CloudinaryComponent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ CloudinaryComponent.childContextTypes = {};
101101
function typesFrom(configParams) {
102102
configParams = configParams || [];
103103
const types = {};
104-
for (let key of configParams) {
104+
for (let i =0; i < configParams.length; i++) {
105+
const key = configParams[i];
105106
types[camelCase(key)] = PropTypes.any;
106107
}
107108
return types;

0 commit comments

Comments
 (0)