fix(router): generate empty array (#133)

fix #129
This commit is contained in:
Eduardo San Martin Morote 2021-01-22 17:41:31 +01:00 committed by GitHub
parent ba0fae74a7
commit 0b31d93892

View File

@ -44,9 +44,7 @@ export async function createApp (
app.routes.push(...(await resolvePagesRoutes(builder, app)))
}
// TODO: Hook to extend routes
if (app.routes.length) {
app.templates.routes = serializeRoutes(app.routes)
}
app.templates.routes = serializeRoutes(app.routes)
// Fallback app.main
if (!app.main && app.routes.length) {