js: Drop a StorageAwareMap entirely from storage if all keys expired

This commit is contained in:
Johannes Meyer 2019-07-18 07:43:42 +02:00
parent cfa3af51db
commit 8893db0cbc
1 changed files with 6 additions and 1 deletions

View File

@ -234,7 +234,12 @@
}, this);
}
storage.set(key, items);
if (!! items && items.length) {
storage.set(key, items);
} else if(items !== null) {
storage.remove(key);
}
return (new Icinga.Storage.StorageAwareMap(items).setStorage(storage, key));
};