fix variable shadow bug

This commit is contained in:
Chris Wanstrath 2026-02-09 11:57:02 -08:00
parent 1354e41375
commit 3744454076

View File

@ -201,7 +201,7 @@ export class Hype<
let Layout = defaultLayout
const layoutPath = join(process.env.PWD ?? '.', `./src/pages/_layout.tsx`)
if (await Bun.file(layoutPath).exists()) {
let Layout = pageCache.get(layoutPath)
Layout = pageCache.get(layoutPath)
if (!Layout) {
Layout = (await import(layoutPath + `?t=${Date.now()}`)).default
pageCache.set(layoutPath, Layout)