Pārlūkot izejas kodu

rn,storage: fix not using a persistent localStorage

In
1ffd75c0a6
we switched to using the localStorage wrapper provided by js-utils, which
checks for window.localStorage's availability very early. Our polyfill must be
applied earlier that any such import.

Here we are importing it in the entrypoint, which means no code ran before this,
literally.
j8
Saúl Ibarra Corretgé 5 gadus atpakaļ
vecāks
revīzija
062bc13d4f

+ 0
- 8
react/features/base/lib-jitsi-meet/native/polyfills-browser.js Parādīt failu

@@ -3,14 +3,6 @@ import '@webcomponents/url'; // Polyfill for URL constructor
3 3
 
4 4
 import { Platform } from '../../react';
5 5
 
6
-// XXX The library lib-jitsi-meet utilizes window.localStorage at the time of
7
-// this writing and, consequently, the browser-related polyfills implemented
8
-// here by the feature base/lib-jitsi-meet for the purposes of the library
9
-// lib-jitsi-meet are incomplete without the Web Storage API! Should the library
10
-// lib-jitsi-meet (and its dependencies) stop utilizing window.localStorage,
11
-// the following import may be removed:
12
-import '../../storage';
13
-
14 6
 /**
15 7
  * Gets the first common prototype of two specified Objects (treating the
16 8
  * objects themselves as prototypes as well).

+ 3
- 0
react/index.native.js Parādīt failu

@@ -10,6 +10,9 @@
10 10
 // collect the polyfills' files.
11 11
 import './features/base/lib-jitsi-meet/native/polyfills-bundler';
12 12
 
13
+// Polyfill localStorage early so any library that requires it sees it available.
14
+import './features/base/storage/native/polyfills-browser';
15
+
13 16
 import React, { PureComponent } from 'react';
14 17
 import { AppRegistry } from 'react-native';
15 18
 

Notiek ielāde…
Atcelt
Saglabāt