diff --git a/assets/js/components/conversations/cachingOpened.js b/assets/js/components/conversations/cachingOpened.js index 7629d694..cf5c631a 100644 --- a/assets/js/components/conversations/cachingOpened.js +++ b/assets/js/components/conversations/cachingOpened.js @@ -52,8 +52,13 @@ ComunicWeb.components.conversations.cachingOpened = { conversations.splice(entryNumber, 1); //Save the new values - var conversationsString = conversations.join(";"); - sessionStorage.setItem(this.__varName, conversationsString); + if(conversations.length === 0){ + this.emptyStorage(); //Clear storage + } + else { + var conversationsString = conversations.join(";"); + sessionStorage.setItem(this.__varName, conversationsString); + } //Success return true;