From 789e6ea83f813cb37bac0b25d8993b01d3188f6d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 11 Oct 2018 15:12:11 +0200 Subject: [PATCH 1/2] Server icon not displayed on sidebar if double trailing slash in server url --- src/scripts/sidebar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/sidebar.js b/src/scripts/sidebar.js index 0ae57776fc..461e5cc27b 100644 --- a/src/scripts/sidebar.js +++ b/src/scripts/sidebar.js @@ -168,7 +168,7 @@ class SideBar extends EventEmitter { setImage(hostUrl) { const img = this.getByUrl(hostUrl).querySelector('img'); - img.src = `${ hostUrl }/assets/favicon.svg?v=${ Math.round(Math.random() * 10000) }`; + img.src = `${ hostUrl.replace(/\\/$/, "") }/assets/favicon.svg?v=${ Math.round(Math.random() * 10000) }`; } remove(hostUrl) { From a02b2de422630e220cffc74328052fe1a9745a4d Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 11 Oct 2018 15:48:12 +0200 Subject: [PATCH 2/2] Typo --- src/scripts/sidebar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/sidebar.js b/src/scripts/sidebar.js index 461e5cc27b..8b6a72b90b 100644 --- a/src/scripts/sidebar.js +++ b/src/scripts/sidebar.js @@ -168,7 +168,7 @@ class SideBar extends EventEmitter { setImage(hostUrl) { const img = this.getByUrl(hostUrl).querySelector('img'); - img.src = `${ hostUrl.replace(/\\/$/, "") }/assets/favicon.svg?v=${ Math.round(Math.random() * 10000) }`; + img.src = `${ hostUrl.replace(/\/$/, '') }/assets/favicon.svg?v=${ Math.round(Math.random() * 10000) }`; } remove(hostUrl) {