Skip to content
Open
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
13 changes: 9 additions & 4 deletions src/stores/board.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,20 @@ export const useBoardStore = defineStore('board', {
},
async loadBoardById(boardId) {
this.filter = { tags: [], users: [], due: '', unassigned: false, completed: 'both' }
this.setCurrentBoard(null)
const board = await apiClient.loadById(boardId)
this.setCurrentBoard(board)
this.setAssignableUsers(board.users)
try {
const board = await apiClient.loadById(boardId)
this.setCurrentBoard(board)
this.addBoard(board)
this.setAssignableUsers(board.users)
} catch (err) {
this.setCurrentBoard(null)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any error reporting is swallowed, there is no user feedback in such a case. Maybe better throw again after the setCurrentBoard call.

}
},
async refreshBoard(boardId) {
const board = await apiClient.loadById(boardId)
const etagHasChanged = board.ETag !== this.currentBoard?.ETag
this.setCurrentBoard(board)
this.addBoard(board)
this.setAssignableUsers(board.users)

if (etagHasChanged) {
Expand Down