storage.js: Properly check if we have any keys left before clearing the storage
This commit is contained in:
parent
226b58ac9d
commit
2179518904
|
@ -234,9 +234,9 @@
|
|||
}, this);
|
||||
}
|
||||
|
||||
if (!! items && items.length) {
|
||||
if (!! items && Object.keys(items).length) {
|
||||
storage.set(key, items);
|
||||
} else if(items !== null) {
|
||||
} else if (items !== null) {
|
||||
storage.remove(key);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue