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