浏览代码

[RN] Polyfill sessionStorage via Storage

j8
Lyubo Marinov 8 年前
父节点
当前提交
5e6cea63fb
共有 1 个文件被更改,包括 1 次插入16 次删除
  1. 1
    16
      react/features/base/lib-jitsi-meet/native/polyfills-browser.js

+ 1
- 16
react/features/base/lib-jitsi-meet/native/polyfills-browser.js 查看文件

@@ -333,22 +333,7 @@ function _visitNode(node, callback) {
333 333
     // - herment
334 334
     // - Strophe
335 335
     if (typeof global.sessionStorage === 'undefined') {
336
-        let internalStorage = {};
337
-
338
-        global.sessionStorage = {
339
-            clear() {
340
-                internalStorage = {};
341
-            },
342
-            getItem(key) {
343
-                return internalStorage[key];
344
-            },
345
-            removeItem(key) {
346
-                delete internalStorage[key];
347
-            },
348
-            setItem(key, value) {
349
-                internalStorage[key] = value;
350
-            }
351
-        };
336
+        global.sessionStorage = new Storage();
352 337
     }
353 338
 
354 339
     // WebRTC

正在加载...
取消
保存