sc
This commit is contained in:
4
src/plugins/cache/index.js
vendored
4
src/plugins/cache/index.js
vendored
@@ -26,7 +26,7 @@ const sessionCache = {
|
|||||||
let storage = storageStr ? JSON.parse(storageStr) : {}
|
let storage = storageStr ? JSON.parse(storageStr) : {}
|
||||||
return storage[key]
|
return storage[key]
|
||||||
},
|
},
|
||||||
remove(key) {
|
delete(key) {
|
||||||
if (!sessionStorage) {
|
if (!sessionStorage) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ const localCache = {
|
|||||||
let storage = storageStr ? JSON.parse(storageStr) : {}
|
let storage = storageStr ? JSON.parse(storageStr) : {}
|
||||||
return storage[key]
|
return storage[key]
|
||||||
},
|
},
|
||||||
remove(key) {
|
delete(key) {
|
||||||
if (!localStorage) {
|
if (!localStorage) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user