[RN] Polyfill sessionStorage via Storage
This commit is contained in:
parent
0d3927fed1
commit
5e6cea63fb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue