Skip to content

Commit 860abc6

Browse files
committed
Debug ctx.isPrerendered in the i18n middleware
1 parent 39ef699 commit 860abc6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/middlewares/i18n-redirect.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ export default defineMiddleware((ctx, next) => {
7474
const url = new URL(ctx.request.url);
7575
const pathname = url.pathname;
7676

77-
// Skip it if not matching
77+
console.log("i18n-redirect middleware:");
78+
console.log(" -- isPrerendered:", ctx.isPrerendered);
79+
7880
if (!(i18MatcherRegexp as unknown as RegExp).test(pathname)) {
7981
return next();
8082
}

0 commit comments

Comments
 (0)