From 3a9212b17a5de68e1e54ea6e5dabfc220af8a07b Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Fri, 12 Aug 2022 11:39:05 -0500 Subject: [PATCH] fix: always try the `lastBoardId` when switching teams (#3673) Co-authored-by: Scott Bishel --- webapp/src/pages/boardPage/teamToBoardAndViewRedirect.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/webapp/src/pages/boardPage/teamToBoardAndViewRedirect.tsx b/webapp/src/pages/boardPage/teamToBoardAndViewRedirect.tsx index 219cfaecb..10f4b32a0 100644 --- a/webapp/src/pages/boardPage/teamToBoardAndViewRedirect.tsx +++ b/webapp/src/pages/boardPage/teamToBoardAndViewRedirect.tsx @@ -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) {