perf: enable strict ts type checking (#4045)

This commit is contained in:
Vben
2024-08-05 21:12:22 +08:00
committed by GitHub
parent e5ec8e6b51
commit 4f5783d00b
41 changed files with 124 additions and 76 deletions

View File

@@ -71,7 +71,7 @@ async function generateRoutes(
const firstChild = route.children[0];
// 如果子路由不是以/开头,则直接返回,这种情况需要计算全部父级的path才能得出正确的path这里不做处理
if (!firstChild.path || !firstChild.path.startsWith('/')) {
if (!firstChild?.path || !firstChild.path.startsWith('/')) {
return route;
}