From ee6546897d98dc5a7c3a4dea77d86b94f4f54a80 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 30 Mar 2025 16:53:18 +0800 Subject: [PATCH] fix: router lazy promise error --- packages/utils/src/route-builder.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/utils/src/route-builder.ts b/packages/utils/src/route-builder.ts index 832063f7a..c617d86f0 100644 --- a/packages/utils/src/route-builder.ts +++ b/packages/utils/src/route-builder.ts @@ -1,5 +1,4 @@ import { get, omit } from "es-toolkit/compat" -import { Fragment } from "react/jsx-runtime" import type { RouteObject } from "react-router" type NestedStructure = { [key: string]: NestedStructure } @@ -85,7 +84,7 @@ export function buildGlobRoutes(glob: Record Promise>): Route if (isGroupedRoute) { const accessPath = `${segmentPathKey}/layout.tsx` - const globGetter = get(glob, accessPath) || (() => Fragment) + const globGetter = get(glob, accessPath) || undefined if (pathGetterSet.has(accessPath)) { // throw new Error(`duplicate path: ` + accessPath)