When a site is found that matches a full url, and the baseUrl ends with
a '/', then remove that when adjusting to the configured site.
Showing
1 changed file
with
4 additions
and
0 deletions
... | @@ -95,6 +95,10 @@ export const getUrl = async(url: string) => { | ... | @@ -95,6 +95,10 @@ export const getUrl = async(url: string) => { |
95 | if (url.startsWith(baseUrl)) { | 95 | if (url.startsWith(baseUrl)) { |
96 | return getSitePage(site, url.substring(baseUrl.length)) | 96 | return getSitePage(site, url.substring(baseUrl.length)) |
97 | } | 97 | } |
98 | if (url.startsWith(baseUrl)) { | ||
99 | const newUrl = url.substring(baseUrl[ baseUrl.length - 1 ] === '/' ? baseUrl.length - 1 : baseUrl.length) | ||
100 | return getSitePage(site, newUrl) | ||
101 | } | ||
98 | } | 102 | } |
99 | return getSitePage('default', url) | 103 | return getSitePage('default', url) |
100 | } | 104 | } | ... | ... |
-
Please register or sign in to post a comment