fix(router): Set the correct loader return value for the new version of the router component

This commit is contained in:
haitaoo 2023-02-21 18:12:05 +08:00
parent 8df84b7684
commit e899f4b362
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,10 @@ const routes: RouteNode[] = [
{
path: '/',
page: 'pages/Layout',
loader: guard.setupApp,
loader: async () => {
await guard.setupApp();
return null;
},
guard: () => {
const gr = guard.shouldLoginRequired();
if (!gr.ok) {