Commit 054e9fc8 authored by Tristan Cavelier's avatar Tristan Cavelier

jio.js updated

parent 4b2588af
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
return localStorage.setItem(item, JSON.stringify(value)); return localStorage.setItem(item, JSON.stringify(value));
}, },
removeItem: function (item) { removeItem: function (item) {
delete localStorage[item]; return localStorage.removeItem(item);
}, },
clone: function () { clone: function () {
return JSON.parse(JSON.stringify(localStorage)); return JSON.parse(JSON.stringify(localStorage));
...@@ -41,8 +41,7 @@ ...@@ -41,8 +41,7 @@
localstorage = { localstorage = {
getItem: function (item) { getItem: function (item) {
var value = pseudo_localStorage[item]; var value = pseudo_localStorage[item];
return value === undefined ? return value === undefined ? null : JSON.parse(value);
null : JSON.parse(pseudo_localStorage[item]);
}, },
setItem: function (item, value) { setItem: function (item, value) {
pseudo_localStorage[item] = JSON.stringify(value); pseudo_localStorage[item] = JSON.stringify(value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment