[RN] Polyfill sessionStorage via Storage

This commit is contained in:
Lyubo Marinov 2017-09-07 12:32:54 -05:00
parent 0d3927fed1
commit 5e6cea63fb
1 changed files with 1 additions and 16 deletions

View File

@ -333,22 +333,7 @@ function _visitNode(node, callback) {
// - herment // - herment
// - Strophe // - Strophe
if (typeof global.sessionStorage === 'undefined') { if (typeof global.sessionStorage === 'undefined') {
let internalStorage = {}; global.sessionStorage = new Storage();
global.sessionStorage = {
clear() {
internalStorage = {};
},
getItem(key) {
return internalStorage[key];
},
removeItem(key) {
delete internalStorage[key];
},
setItem(key, value) {
internalStorage[key] = value;
}
};
} }
// WebRTC // WebRTC