diff --git a/packages/client/src/nirax.ts b/packages/client/src/nirax.ts index 51f1dc20a..795e27eb5 100644 --- a/packages/client/src/nirax.ts +++ b/packages/client/src/nirax.ts @@ -2,7 +2,7 @@ import { EventEmitter } from 'eventemitter3'; import { Component, shallowRef, ShallowRef } from 'vue'; -import { pleaseLogin } from '@/scripts/please-login'; +import { pleaseLoginOrPage } from '@/scripts/please-login'; import { safeURIDecode } from '@/scripts/safe-uri-decode'; type RouteDef = { @@ -174,7 +174,7 @@ export class Router extends EventEmitter<{ } if (res.route.loginRequired) { - pleaseLogin('/'); + pleaseLoginOrPage('/'); } const isSamePath = beforePath === path; diff --git a/packages/client/src/scripts/please-login.ts b/packages/client/src/scripts/please-login.ts index 52862427b..660876070 100644 --- a/packages/client/src/scripts/please-login.ts +++ b/packages/client/src/scripts/please-login.ts @@ -3,7 +3,7 @@ import { $i } from '@/account'; import { i18n } from '@/i18n'; import { popup } from '@/os'; -export function pleaseLogin(path?: string) { +export function pleaseLoginOrPage(path?: string) { if ($i) return; popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), {