fix: always try the lastBoardId when switching teams (#3673)

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
This commit is contained in:
Paul Esch-Laurent 2022-08-12 11:39:05 -05:00 committed by GitHub
parent c33840004d
commit 3a9212b17a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,9 +25,7 @@ const TeamToBoardAndViewRedirect = (): null => {
let boardID = match.params.boardId
if (!match.params.boardId) {
// first preference is for last visited board
if (boards[UserSettings.lastBoardId[teamId]]) {
boardID = UserSettings.lastBoardId[teamId]
}
boardID = UserSettings.lastBoardId[teamId]
// if last visited board is unavailable, use the first board in categories list
if (!boardID && categories.length > 0) {