Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit b91a90c

Browse files
committed
fix importRouteModule function
1 parent f937d0b commit b91a90c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ export async function importRouteModule({ filename, pattern }: RouteMeta, appDir
2424
return modules[pattern.pathname];
2525
}
2626

27-
const version = depGraph.get(filename)?.version ?? depGraph.globalVersion;
27+
const version = depGraph.get(filename)?.version;
2828
const origin = Reflect.get(globalThis, "__ALEPH_SERVER_ORIGIN");
2929

3030
let url: string;
3131
if (origin) {
32-
url = `${origin}${cleanPath(filename)}?ssr&v=${(version).toString(36)}`;
32+
url = `${origin}${cleanPath(filename)}?ssr&v=${(version ?? depGraph.globalVersion).toString(36)}`;
3333
} else {
3434
const root = appDir ? path.resolve(appDir) : getAppDir();
3535
url = `file://${path.join(root, filename)}${version ? "#" + version.toString(36) : ""}`;

0 commit comments

Comments
 (0)