storage.js: Directly use scope `window` to access `localStorage`

This commit is contained in:
Johannes Meyer 2019-07-08 13:26:32 +02:00
parent 95dee43f5b
commit 03fc052749
1 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@
* @returns {void}
*/
set: function(key, value) {
localStorage.setItem(this.prefixKey(key), JSON.stringify(value));
window.localStorage.setItem(this.prefixKey(key), JSON.stringify(value));
},
/**
@ -77,7 +77,7 @@
* @returns {*}
*/
get: function(key) {
return JSON.parse(localStorage.getItem(this.prefixKey(key)));
return JSON.parse(window.localStorage.getItem(this.prefixKey(key)));
},
/**
@ -88,7 +88,7 @@
* @returns {void}
*/
remove: function(key) {
localStorage.removeItem(this.prefixKey(key));
window.localStorage.removeItem(this.prefixKey(key));
},
/**