fix: 非ログイン時にクレデンシャルが必要なページに行くとエラーが出る問題を修正 (#10973)
* 非ログイン時にクレデンシャルが必要なページに行くとエラーが出る問題を修正 (misskey-dev/misskey#10922) * Update CHANGELOG.md * fix * Update CHANGELOG.md * Update CHANGELOG.md
This commit is contained in:
@@ -4,7 +4,7 @@ import { $i, iAmModerator } from '@/account';
|
||||
import MkLoading from '@/pages/_loading_.vue';
|
||||
import MkError from '@/pages/_error_.vue';
|
||||
|
||||
const page = (loader: AsyncComponentLoader<any>) => defineAsyncComponent({
|
||||
export const page = (loader: AsyncComponentLoader<any>) => defineAsyncComponent({
|
||||
loader: loader,
|
||||
loadingComponent: MkLoading,
|
||||
errorComponent: MkError,
|
||||
@@ -505,7 +505,7 @@ export const routes = [{
|
||||
component: page(() => import('./pages/not-found.vue')),
|
||||
}];
|
||||
|
||||
export const mainRouter = new Router(routes, location.pathname + location.search + location.hash);
|
||||
export const mainRouter = new Router(routes, location.pathname + location.search + location.hash, !!$i, page(() => import('@/pages/not-found.vue')));
|
||||
|
||||
window.history.replaceState({ key: mainRouter.getCurrentKey() }, '', location.href);
|
||||
|
||||
|
Reference in New Issue
Block a user