diff --git a/app/assets/javascripts/discourse/lib/url.js.es6 b/app/assets/javascripts/discourse/lib/url.js.es6 index 50ef5e45f68..93e1ca73151 100644 --- a/app/assets/javascripts/discourse/lib/url.js.es6 +++ b/app/assets/javascripts/discourse/lib/url.js.es6 @@ -139,9 +139,7 @@ const DiscourseURL = Ember.Object.extend({ } } - rewrites.forEach(function(rw) { - path = path.replace(rw.regexp, rw.replacement); - }); + rewrites.forEach(rw => path = path.replace(rw.regexp, rw.replacement)); if (this.navigatedToPost(oldPath, path)) { return; } // Schedule a DOM cleanup event diff --git a/app/assets/javascripts/discourse/widgets/home-logo.js.es6 b/app/assets/javascripts/discourse/widgets/home-logo.js.es6 index 31aea3d6ebc..dc52db7cba5 100644 --- a/app/assets/javascripts/discourse/widgets/home-logo.js.es6 +++ b/app/assets/javascripts/discourse/widgets/home-logo.js.es6 @@ -48,7 +48,13 @@ export default createWidget('home-logo', { click(e) { if (wantsNewWindow(e)) { return false; } + e.preventDefault(); + const a = $(e.target).closest('a')[0]; + if (a && a.host !== document.location.host) { + document.location = a.href; + } + DiscourseURL.routeTo(this.href()); return false; }