Skip to content

Commit

Permalink
Reset board state when moving to Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
raimohanska committed Mar 11, 2024
1 parent e039fd8 commit c3fe3d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/store/board-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,10 +507,10 @@ export function BoardStore(
})

boardId.forEach(async (boardId) => {
// Reset board id in state, until we have fetched the local state
dispatch({ action: "ui.board.setLocal", boardId: undefined, storedInitialState: undefined })
if (boardId) {
console.log("Got board id, fetching local state", boardId)
// Reset board id in state, until we have fetched the local state
dispatch({ action: "ui.board.setLocal", boardId: undefined, storedInitialState: undefined })
const storedInitialState = await localStore.getInitialBoardState(boardId)
dispatch({ action: "ui.board.setLocal", boardId, storedInitialState }) // This is for the reducer locally to start offline mode
checkReadyToJoin()
Expand Down

0 comments on commit c3fe3d9

Please sign in to comment.