A platform for community discussion. Free, open, simple.
FIX: Ensure page is reloaded correctly when a hash is present (#8096)
David Taylor39f7e98b60a3
diff --git a/app/assets/javascripts/admin/models/backup.js.es6 b/app/assets/javascripts/admin/models/backup.js.es6index 7dc945d1ae9..7cd151378ab 100644--- a/app/assets/javascripts/admin/models/backup.js.es6+++ b/app/assets/javascripts/admin/models/backup.js.es6@@ -63,7 +63,7 @@ Backup.reopenClass({bootbox.alert(result.message);} else {// redirect to homepage (session might be lost)- window.location.pathname = Discourse.getURL("/");+ window.location = Discourse.getURL("/");}});}diff --git a/app/assets/javascripts/admin/routes/admin-backups.js.es6 b/app/assets/javascripts/admin/routes/admin-backups.js.es6index b06b3e8468e..b70c9782868 100644--- a/app/assets/javascripts/admin/routes/admin-backups.js.es6+++ b/app/assets/javascripts/admin/routes/admin-backups.js.es6@@ -36,7 +36,7 @@ export default Discourse.Route.extend({);if (log.operation === "restore") {// redirect to homepage when the restore is done (session might be lost)- window.location.pathname = Discourse.getURL("/");+ window.location = Discourse.getURL("/");}} else {this.controllerFor("adminBackupsLogs")diff --git a/app/assets/javascripts/discourse/controllers/login.js.es6 b/app/assets/javascripts/discourse/controllers/login.js.es6index 13c77deab76..dfe7eaf68c7 100644--- a/app/assets/javascripts/discourse/controllers/login.js.es6+++ b/app/assets/javascripts/discourse/controllers/login.js.es6@@ -349,7 +349,7 @@ export default Ember.Controller.extend(ModalFunctionality, {$.removeCookie("destination_url");window.location.href = destinationUrl;} else if (window.location.pathname === Discourse.getURL("/login")) {- window.location.pathname = Discourse.getURL("/");+ window.location = Discourse.getURL("/");} else {window.location.reload();}diff --git a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6 b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6index f5c1f6f5add..8bf5d24d27a 100644--- a/app/assets/javascripts/discourse/controllers/preferences/account.js.es6+++ b/app/assets/javascripts/discourse/controllers/preferences/account.js.es6@@ -190,7 +190,7 @@ export default Ember.Controller.extend(() => {bootbox.alert(I18n.t("user.deleted_yourself"),- () => (window.location.pathname = Discourse.getURL("/"))+ () => (window.location = Discourse.getURL("/")));},() => {@@ -238,7 +238,7 @@ export default Ember.Controller.extend(if (!token) {const redirect = this.siteSettings.logout_redirect;if (Ember.isEmpty(redirect)) {- window.location.pathname = Discourse.getURL("/");+ window.location = Discourse.getURL("/");} else {window.location.href = redirect;}diff --git a/app/assets/javascripts/discourse/lib/logout.js.es6 b/app/assets/javascripts/discourse/lib/logout.js.es6index 888b07eca92..5e81d738e3a 100644--- a/app/assets/javascripts/discourse/lib/logout.js.es6+++ b/app/assets/javascripts/discourse/lib/logout.js.es6@@ -9,7 +9,7 @@ export default function logout(siteSettings, keyValueStore) {const redirect = siteSettings.logout_redirect;if (Ember.isEmpty(redirect)) {- window.location.pathname = Discourse.getURL("/");+ window.location = Discourse.getURL("/");} else {window.location.href = redirect;}