Modify only required parts of url

This commit is contained in:
Suven-p 2024-10-27 20:03:43 +05:45
parent d9c626d4cc
commit db1a980e23

View file

@ -205,12 +205,11 @@ router.beforeEach((to, from) => {
// Without this check, the router will be stuck in an infinite loop // Without this check, the router will be stuck in an infinite loop
if (to.path !== from.path && !to.redirectedFrom) { if (to.path !== from.path && !to.redirectedFrom) {
return { return {
path: to.path, ...to,
query: { query: {
...to.query, ...to.query,
...from.query, ...from.query,
}, },
params: to.params,
}; };
} }
}); });