From 2c1e26cb527013256689db44f0e83cf5e64377bf Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 27 Jan 2020 13:37:52 +0100 Subject: [PATCH] Remove # symbol when no hash --- www/common/onlyoffice/main.js | 2 +- www/common/sframe-app-outer.js | 2 +- www/drive/main.js | 2 +- www/poll/main.js | 2 +- www/teams/main.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/common/onlyoffice/main.js b/www/common/onlyoffice/main.js index 600901872..7007bd360 100644 --- a/www/common/onlyoffice/main.js +++ b/www/common/onlyoffice/main.js @@ -24,7 +24,7 @@ define([ // Hidden hash hash = window.location.hash; href = window.location.href; - if (window.history && window.history.replaceState) { + if (window.history && window.history.replaceState && hash) { window.history.replaceState({}, window.document.title, '#'); } document.getElementById('sbox-iframe').setAttribute('src', diff --git a/www/common/sframe-app-outer.js b/www/common/sframe-app-outer.js index 563430c42..d85266ca7 100644 --- a/www/common/sframe-app-outer.js +++ b/www/common/sframe-app-outer.js @@ -23,7 +23,7 @@ define([ // Hidden hash hash = window.location.hash; href = window.location.href; - if (window.history && window.history.replaceState) { + if (window.history && window.history.replaceState && hash) { window.history.replaceState({}, window.document.title, '#'); } diff --git a/www/drive/main.js b/www/drive/main.js index 0a7f78049..00f64c2c3 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -24,7 +24,7 @@ define([ // Hidden hash hash = window.location.hash; href = window.location.href; - if (window.history && window.history.replaceState) { + if (window.history && window.history.replaceState && hash) { window.history.replaceState({}, window.document.title, '#'); } diff --git a/www/poll/main.js b/www/poll/main.js index f2747b055..d1bdca24d 100644 --- a/www/poll/main.js +++ b/www/poll/main.js @@ -24,7 +24,7 @@ define([ // Hidden hash hash = window.location.hash; href = window.location.href; - if (window.history && window.history.replaceState) { + if (window.history && window.history.replaceState && hash) { window.history.replaceState({}, window.document.title, '#'); } diff --git a/www/teams/main.js b/www/teams/main.js index 36c4e4f66..cfaae69a2 100644 --- a/www/teams/main.js +++ b/www/teams/main.js @@ -24,7 +24,7 @@ define([ // Hidden hash hash = window.location.hash; href = window.location.href; - if (window.history && window.history.replaceState) { + if (window.history && window.history.replaceState && hash) { window.history.replaceState({}, window.document.title, '#'); }