mirror of
https://github.com/discourse/discourse.git
synced 2025-02-18 01:05:00 +00:00
FIX: subfolder redirects to wrong URL if the subfolder appears in the slug
This commit is contained in:
parent
94622b451a
commit
35bef72d4e
@ -66,7 +66,8 @@ const DiscourseLocation = Ember.Object.extend({
|
||||
getURL() {
|
||||
const location = get(this, "location");
|
||||
let url = location.pathname;
|
||||
url = url.replace(Discourse.BaseUri, "");
|
||||
|
||||
url = url.replace(new RegExp(`^${Discourse.BaseUri}`), "");
|
||||
|
||||
const search = location.search || "";
|
||||
url += search;
|
||||
|
Loading…
x
Reference in New Issue
Block a user