mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2026-01-23 08:00:22 +08:00
style: lint
This commit is contained in:
@@ -35,7 +35,8 @@ class Storage {
|
||||
|
||||
getItem(key, def = null) {
|
||||
const val = this.storage.getItem(this.getKey(key))
|
||||
if (!val) return def
|
||||
if (!val)
|
||||
return def
|
||||
try {
|
||||
const data = JSON.parse(val)
|
||||
const { value, time, expire } = data
|
||||
@@ -44,7 +45,8 @@ class Storage {
|
||||
}
|
||||
this.remove(key)
|
||||
return def
|
||||
} catch (error) {
|
||||
}
|
||||
catch (error) {
|
||||
this.remove(key)
|
||||
return def
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user