mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-23 18:34:02 +02:00
fix: don't re-.push() the URL if already on teamId (#3651)
This commit is contained in:
parent
19ef6533f6
commit
c0a2207087
@ -241,7 +241,9 @@ export default class Plugin {
|
||||
const currentTeamID = mmStore.getState().entities.teams.currentTeamId
|
||||
if (currentTeamID && currentTeamID !== prevTeamID) {
|
||||
if (prevTeamID && window.location.pathname.startsWith(windowAny.frontendBaseURL || '')) {
|
||||
browserHistory.push(`/team/${currentTeamID}`)
|
||||
// Don't re-push the URL if we're already on a URL for the current team
|
||||
if (!window.location.pathname.startsWith(`${(windowAny.frontendBaseURL || '')}/team/${currentTeamID}`))
|
||||
browserHistory.push(`/team/${currentTeamID}`)
|
||||
}
|
||||
prevTeamID = currentTeamID
|
||||
store.dispatch(setTeam(currentTeamID))
|
||||
|
Loading…
x
Reference in New Issue
Block a user