From a26e0df0c7ccae5773c76027a24b62c52970bca4 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 20 Sep 2016 11:13:40 -0400 Subject: [PATCH] FIX: Bug when linking to anchors --- app/assets/javascripts/discourse/lib/url.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/url.js.es6 b/app/assets/javascripts/discourse/lib/url.js.es6 index a645022f171..3391986f719 100644 --- a/app/assets/javascripts/discourse/lib/url.js.es6 +++ b/app/assets/javascripts/discourse/lib/url.js.es6 @@ -121,7 +121,7 @@ const DiscourseURL = Ember.Object.extend({ } // Scroll to the same page, different anchor - const m = /#(.+)$/.exec(path); + const m = /^#(.+)$/.exec(path); if (m) { jumpToElement(m[1]); return this.replaceState(path);