Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Polyfill sessionStorage via Storage

Lyubo Marinov5e6cea63fbf1
diff --git a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
index b03f99c0ee..f161d7ceb5 100644
--- a/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
+++ b/react/features/base/lib-jitsi-meet/native/polyfills-browser.js
@@ -333,22 +333,7 @@ function _visitNode(node, callback) {
// - herment
// - Strophe
if (typeof global.sessionStorage === 'undefined') {
- let internalStorage = {};
-
- global.sessionStorage = {
- clear() {
- internalStorage = {};
- },
- getItem(key) {
- return internalStorage[key];
- },
- removeItem(key) {
- delete internalStorage[key];
- },
- setItem(key, value) {
- internalStorage[key] = value;
- }
- };
+ global.sessionStorage = new Storage();
}
// WebRTC