Skip to content

Commit e425c89

Browse files
authored
[BUGFIX] argilla frontend: Avoid call router.push when opening an external URL (#5675)
# Description <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. --> This PR fixes the `router.go` method and avoids calling `router.push` when the external flag is True **Type of change** <!-- Please delete options that are not relevant. Remember to title the PR according to the type of change --> - Bug fix (non-breaking change which fixes an issue) **How Has This Been Tested** <!-- Please add some reference about how your feature has been tested. --> **Checklist** <!-- Please go over the list and make sure you've taken everything into account --> - I added relevant documentation - I followed the style guidelines of this project - I did a self-review of my code - I made corresponding changes to the documentation - I confirm My changes generate no new warnings - I have added tests that prove my fix is effective or that my feature works - I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)
1 parent 229809e commit e425c89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

argilla-frontend/v1/infrastructure/services/useRoutes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ export const useRoutes = () => {
133133
} else {
134134
window.location.href = where;
135135
}
136+
} else {
137+
router.push(where);
136138
}
137-
138-
router.push(where);
139139
};
140140

141141
const getQuery = () => {

0 commit comments

Comments
 (0)