diff --git a/public/js/icinga/behavior/collapsible.js b/public/js/icinga/behavior/collapsible.js index 245f021e4..0a4302d2a 100644 --- a/public/js/icinga/behavior/collapsible.js +++ b/public/js/icinga/behavior/collapsible.js @@ -132,7 +132,7 @@ _this.state.delete(collapsiblePath); _this.collapse($collapsible); } else { - _this.state.set(collapsiblePath, 1); + _this.state.set(collapsiblePath); _this.expand($collapsible); } } diff --git a/public/js/icinga/storage.js b/public/js/icinga/storage.js index af6b3bb1f..03e3f3a2a 100644 --- a/public/js/icinga/storage.js +++ b/public/js/icinga/storage.js @@ -312,11 +312,15 @@ * Set the value for the key in the map * * @param {string} key - * @param {*} value + * @param {*} value Default null * * @returns {this} */ set: function(key, value) { + if (typeof value === 'undefined') { + value = null; + } + this.data.set(key, {'value': value, 'lastAccess': Date.now()}); this.updateStorage();