mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
don't append empty path to redirect
This commit is contained in:
parent
d33c0a3eb7
commit
11287818bd
1 changed files with 5 additions and 1 deletions
|
|
@ -10,7 +10,11 @@ export function useLoginGuard(router: Router) {
|
|||
const { data } = useCurrentUser()
|
||||
const authenticated = data.value
|
||||
if (!authenticated) {
|
||||
const query = Object.assign({}, to.query, { redirect: to.fullPath })
|
||||
const query = Object.assign(
|
||||
{},
|
||||
to.query,
|
||||
to.fullPath !== '/' ? { redirect: to.fullPath } : {},
|
||||
)
|
||||
return { name: '/startup', query: query }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue