mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
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);
|
}, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!! items && items.length) {
|
if (!! items && Object.keys(items).length) {
|
||||||
storage.set(key, items);
|
storage.set(key, items);
|
||||||
} else if(items !== null) {
|
} else if (items !== null) {
|
||||||
storage.remove(key);
|
storage.remove(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user