From 21795189048c7f339b5d4659b2f158c01c48bc3f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 25 Jul 2019 10:14:48 +0200 Subject: [PATCH] storage.js: Properly check if we have any keys left before clearing the storage --- public/js/icinga/storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/icinga/storage.js b/public/js/icinga/storage.js index d9df2c668..f85d14b33 100644 --- a/public/js/icinga/storage.js +++ b/public/js/icinga/storage.js @@ -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); }