1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-04-11 11:19:56 +02:00

Fix problem with viewId 0 in the URL (#2474)

This commit is contained in:
Jesús Espino 2022-03-09 19:21:01 +01:00 committed by GitHub
parent c8dea5b691
commit 4cb3a0fae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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