Skip to content

Commit

Permalink
Fix problem with viewId 0 in the URL (mattermost-community#2474)
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino authored Mar 9, 2022
1 parent c8dea5b commit 4cb3a0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/src/pages/boardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const BoardPage = (props: Props): JSX.Element => {

// Ensure boardViews is for our boardId before redirecting
const isCorrectBoardView = boardViews.length > 0 && boardViews[0].parentId === boardId
if (!viewId && isCorrectBoardView) {
if ((!viewId || viewId === '0') && isCorrectBoardView) {
const newPath = generatePath(match.path, {...match.params, boardId, viewId: boardViews[0].id})
history.replace(newPath)
return
Expand Down

0 comments on commit 4cb3a0f

Please sign in to comment.