From 7be040472af08796aec2aa806e262ad7a55af296 Mon Sep 17 00:00:00 2001 From: Suven-p Date: Fri, 1 Nov 2024 16:39:31 +0545 Subject: [PATCH] Bugfix: Preserve query params when navigating to same path --- src/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router.js b/src/router.js index 8832eaf9a..9a2db859d 100644 --- a/src/router.js +++ b/src/router.js @@ -203,7 +203,7 @@ router.beforeEach((to, from) => { // Without this check, modifying any query params will be blocked // Check if redirectedFrom is defined to check if this function has already been run // Without this check, the router will be stuck in an infinite loop - if (to.path !== from.path && !to.redirectedFrom) { + if (to.fullPath !== from.fullPath && !to.redirectedFrom) { return { ...to, query: {