From 1d168e811af1963792d419a394c088b04cda2ff7 Mon Sep 17 00:00:00 2001 From: Crimekillz Date: Thu, 18 Apr 2024 01:37:13 +0200 Subject: [PATCH] Router: Also check permissions for sub-pages --- packages/client/src/nirax.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/nirax.ts b/packages/client/src/nirax.ts index 7e481f148..1d6c03050 100644 --- a/packages/client/src/nirax.ts +++ b/packages/client/src/nirax.ts @@ -224,7 +224,7 @@ export class Router extends EventEmitter<{ throw new Error(`no route found for: ${path}`); } - if (res.route.loginRequired) { + if (res.route.loginRequired || res.child?.route.loginRequired) { pleaseLogin("/"); }