From c661934d41abf4c3fce65ad2b639c22b64f930ca Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Wed, 5 Aug 2020 00:56:49 +0530 Subject: [PATCH] FIX: rewrite of `/my/`URL should work on sub directory site too. --- app/assets/javascripts/discourse/app/lib/url.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/lib/url.js b/app/assets/javascripts/discourse/app/lib/url.js index ae73638a706..682a6259363 100644 --- a/app/assets/javascripts/discourse/app/lib/url.js +++ b/app/assets/javascripts/discourse/app/lib/url.js @@ -243,7 +243,8 @@ const DiscourseURL = EmberObject.extend({ // Rewrite /my/* urls let myPath = getURL("/my"); - if (path.indexOf(myPath) === 0) { + const fullPath = getURL(path); + if (fullPath.indexOf(myPath) === 0) { const currentUser = User.current(); if (currentUser) { path = path.replace(