diff --git a/package.json b/package.json index 37c09fece..a65d25c0b 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "autosize": "^1.18.13", "bootstrap": "3.1.1", "es6-iterator": "2.0.0", + "es6-symbol": "3.1.0", "i18next": "7.0.0", "i18next-browser-languagedetector": "1.0.1", "i18next-xhr-backend": "1.3.0", diff --git a/react/features/base/react/Symbol.js b/react/features/base/react/Symbol.js index cd44f2110..d66ec9ba8 100644 --- a/react/features/base/react/Symbol.js +++ b/react/features/base/react/Symbol.js @@ -1,24 +1,5 @@ -// FIXME React Native does not polyfill Symbol at versions 0.39.2 or earlier. -export default (global => { - let clazz = global.Symbol; - - if (typeof clazz === 'undefined') { - // XXX At the time of this writing we use Symbol only as a way to - // prevent collisions in Redux action types. Consequently, the Symbol - // implementation provided bellow is minimal and specific to our - // purpose. - const toString = function() { - return this.join(''); // eslint-disable-line no-invalid-this - }; - - clazz = description => { - const thiz = (description || '').split(''); - - thiz.toString = toString; - - return thiz; - }; - } - - return clazz; -})(global || window || this); // eslint-disable-line no-invalid-this +// XXX React Native 0.41.2 does not polyfill Symbol. The React source code of +// jitsi/jitsi-meet does utilize Symbol though. However, it is satisfied with a +// ponyfill. +import Symbol from 'es6-symbol'; +export { Symbol as default };