Commit a35b9bd4 authored by Jesse Hallam's avatar Jesse Hallam Committed by Carlos Tadeu Panato Junior

MM-11158: fix subpath logout (#1409)

Fall back to window.basename instead of window.location.origin, to
ensure the subpath is reflected on logout.
parent eb7857b8
...@@ -17,5 +17,9 @@ export function areTimezonesEnabledAndSupported(state) { ...@@ -17,5 +17,9 @@ export function areTimezonesEnabledAndSupported(state) {
export function getBasePath(state) { export function getBasePath(state) {
const config = getConfig(state) || {}; const config = getConfig(state) || {};
return new URL(config.SiteURL || window.location.origin).pathname; if (config.SiteURL) {
return new URL(config.SiteURL).pathname;
}
return window.basename || window.location.origin;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment