diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 7363d511..c422ee44 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -1,4 +1,4 @@ -import { createRouter, createWebHistory, RouteLocationRaw, RouteRecordRaw } from 'vue-router'; +import { createRouter, createWebHistory, RouteLocationRaw, RouteLocationResolvedGeneric, RouteRecordRaw } from 'vue-router'; import authPromise from '../common/auth'; import backend from '../common/backend'; import { baseURL } from '../common/config'; @@ -149,8 +149,8 @@ router.beforeEach((to, from, next) => { await backend.users.putMe(); } }).finally(() => { - delete to.query.sync_me; // remove sync_me query parameter to avoid endless recursion - next({ path: to.path, query: to.query, params: to.params, replace: true }); + let {sync_me: _, ...remainingQuery} = to.query; // remove sync_me query parameter to avoid endless recursion + next({ path: to.path, query: remainingQuery, replace: true }); }); } else { next();