Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with viewId 0 in the URL #2473

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webapp/src/pages/boardPage/boardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const BoardPage = (props: Props): JSX.Element => {
// and set it as most recently viewed board
UserSettings.setLastBoardID(teamId, match.params.boardId)

if (match.params.viewId) {
if (match.params.viewId && match.params.viewId !== '0') {
dispatch(setCurrentView(match.params.viewId))
UserSettings.setLastViewId(match.params.boardId, match.params.viewId)
}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/pages/boardPage/teamToBoardAndViewRedirect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const TeamToBoardAndViewRedirect = (): null => {

// when a view isn't open,
// but the data is available, try opening a view
if (!match.params.viewId && board && board.id === match.params.boardId && boardViews && boardViews.length > 0) {
if ((!viewID || viewID === '0') && board && board.id === match.params.boardId && boardViews && boardViews.length > 0) {
// most recent view gets the first preference
viewID = UserSettings.lastViewId[boardID]
if (viewID) {
Expand Down