From 556e249b786ceed4453d6cf1bd977881b2a6093a Mon Sep 17 00:00:00 2001 From: or-else Date: Wed, 16 May 2018 19:58:39 -0700 Subject: [PATCH] bug fix: incorrect handling of empty hashpath --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 7467dd28..b69d11bb 100644 --- a/index.html +++ b/index.html @@ -3877,12 +3877,15 @@ handleHashRoute: function() { var hash = parseUrlHash(window.location.hash); // Left-side panel selector. - if (hash.path && hash.path.length >0) { + if (hash.path && hash.path.length > 0) { if (['register','settings','edit','cred','newtpk','contacts',''].includes(hash.path[0])) { this.setState({sidePanelSelected: hash.path[0]}); } else { console.log("Unknown sidepanel view", hash.path[0]); } + } else { + // Empty hashpath + this.setState({sidePanelSelected: ''}); } // Topic for MessagesView selector. if (hash.path.length > 1 && hash.path[1] != this.state.topicSelected) {