Fixing redirects on team change outside of boards (#2652)

This commit is contained in:
Jesús Espino 2022-03-29 14:00:19 +02:00 committed by GitHub
parent a99f5341e0
commit aa9ebc237f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -189,8 +189,11 @@ export default class Plugin {
if (currentTeamID && currentTeamID !== prevTeamID) {
prevTeamID = currentTeamID
store.dispatch(setTeam(currentTeamID))
browserHistory.push(`/team/${currentTeamID}`)
wsClient.subscribeToTeam(currentTeamID)
if (window.location.pathname.startsWith(windowAny.frontendBaseURL || '')) {
console.log("REDIRECTING HERE")
browserHistory.push(`/team/${currentTeamID}`)
wsClient.subscribeToTeam(currentTeamID)
}
}
})