[RN] Support the for...of statement in lib-jitsi-meet
This commit is contained in:
parent
246cb39003
commit
bd51613e62
|
@ -20,6 +20,7 @@
|
||||||
"async": "0.9.0",
|
"async": "0.9.0",
|
||||||
"autosize": "^1.18.13",
|
"autosize": "^1.18.13",
|
||||||
"bootstrap": "3.1.1",
|
"bootstrap": "3.1.1",
|
||||||
|
"es6-iterator": "2.0.0",
|
||||||
"i18next": "7.0.0",
|
"i18next": "7.0.0",
|
||||||
"i18next-browser-languagedetector": "1.0.1",
|
"i18next-browser-languagedetector": "1.0.1",
|
||||||
"i18next-xhr-backend": "1.3.0",
|
"i18next-xhr-backend": "1.3.0",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Iterator from 'es6-iterator';
|
||||||
import BackgroundTimer from 'react-native-background-timer';
|
import BackgroundTimer from 'react-native-background-timer';
|
||||||
import 'url-polyfill'; // Polyfill for URL constructor
|
import 'url-polyfill'; // Polyfill for URL constructor
|
||||||
|
|
||||||
|
@ -98,6 +99,18 @@ function _visitNode(node, callback) {
|
||||||
global.addEventListener = () => {};
|
global.addEventListener = () => {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Array.prototype[@@iterator]
|
||||||
|
//
|
||||||
|
// Required by:
|
||||||
|
// - for...of statement use(s) in lib-jitsi-meet
|
||||||
|
const arrayPrototype = Array.prototype;
|
||||||
|
|
||||||
|
if (typeof arrayPrototype['@@iterator'] === 'undefined') {
|
||||||
|
arrayPrototype['@@iterator'] = function() {
|
||||||
|
return new Iterator(this);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// document
|
// document
|
||||||
//
|
//
|
||||||
// Required by:
|
// Required by:
|
||||||
|
|
Loading…
Reference in New Issue