Skip to content

Commit

Permalink
MM-11158: fix subpath logout (mattermost#1409)
Browse files Browse the repository at this point in the history
Fall back to window.basename instead of window.location.origin, to
ensure the subpath is reflected on logout.
  • Loading branch information
lieut-data authored and cpanato committed Jul 6, 2018
1 parent eb7857b commit a35b9bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion selectors/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ export function areTimezonesEnabledAndSupported(state) {
export function getBasePath(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;
}

0 comments on commit a35b9bd

Please sign in to comment.