Skip to content

Commit

Permalink
Merge pull request #1739 from RodriSanchez1/fix/historyReplace
Browse files Browse the repository at this point in the history
Use an absolute path on history replace
  • Loading branch information
RodriSanchez1 authored Jul 15, 2024
2 parents 4638139 + 662deb1 commit eb91845
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Board/Board.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export function toRootBoard() {
if (!firstBoardOnHistory || !allBoardsIds.includes(firstBoardOnHistory)) {
return null;
}
history.replace(firstBoardOnHistory);
history.replace(`/board/${firstBoardOnHistory}`);
dispatch({
type: TO_ROOT_BOARD
});
Expand Down Expand Up @@ -888,7 +888,7 @@ export function removeBoardsFromList(blacklist = [], rootBoard) {
return (dispatch, getState) => {
const actualBoardId = getState().board.activeBoardId;
if (blacklist.includes(actualBoardId)) {
history.replace(rootBoard);
history.replace(`/board/${rootBoard}`);
dispatch(switchBoard(rootBoard));
const rootBoardFinded = dispatch(toRootBoard());
if (!rootBoardFinded || blacklist.includes(rootBoard)) return;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Communicator/Communicator.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export function syncCommunicators(remoteCommunicators) {
const newActiveCommunicator = getActiveCommunicator(getState);
const rootBoard = newActiveCommunicator.rootBoard;
dispatch(switchBoard(rootBoard));
history.replace(rootBoard);
history.replace(`/board/${rootBoard}`);
}
};
}
Expand Down

0 comments on commit eb91845

Please sign in to comment.