|
@@ -1,24 +1,5 @@
|
1
|
|
-// FIXME React Native does not polyfill Symbol at versions 0.39.2 or earlier.
|
2
|
|
-export default (global => {
|
3
|
|
- let clazz = global.Symbol;
|
4
|
|
-
|
5
|
|
- if (typeof clazz === 'undefined') {
|
6
|
|
- // XXX At the time of this writing we use Symbol only as a way to
|
7
|
|
- // prevent collisions in Redux action types. Consequently, the Symbol
|
8
|
|
- // implementation provided bellow is minimal and specific to our
|
9
|
|
- // purpose.
|
10
|
|
- const toString = function() {
|
11
|
|
- return this.join(''); // eslint-disable-line no-invalid-this
|
12
|
|
- };
|
13
|
|
-
|
14
|
|
- clazz = description => {
|
15
|
|
- const thiz = (description || '').split('');
|
16
|
|
-
|
17
|
|
- thiz.toString = toString;
|
18
|
|
-
|
19
|
|
- return thiz;
|
20
|
|
- };
|
21
|
|
- }
|
22
|
|
-
|
23
|
|
- return clazz;
|
24
|
|
-})(global || window || this); // eslint-disable-line no-invalid-this
|
|
1
|
+// XXX React Native 0.41.2 does not polyfill Symbol. The React source code of
|
|
2
|
+// jitsi/jitsi-meet does utilize Symbol though. However, it is satisfied with a
|
|
3
|
+// ponyfill.
|
|
4
|
+import Symbol from 'es6-symbol';
|
|
5
|
+export { Symbol as default };
|