From 5ffba2401a38c4a0dd52e318f3bd0767121499a8 Mon Sep 17 00:00:00 2001 From: Nico Schett <52858351+schettn@users.noreply.github.com> Date: Sat, 4 Sep 2021 21:08:17 +0000 Subject: [PATCH] fix: fix type error Type 'false' cannot be used as an index type. --- packages/jaen-pages/src/contexts/template.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jaen-pages/src/contexts/template.tsx b/packages/jaen-pages/src/contexts/template.tsx index ae5e4d11..c6ca346c 100644 --- a/packages/jaen-pages/src/contexts/template.tsx +++ b/packages/jaen-pages/src/contexts/template.tsx @@ -58,7 +58,7 @@ export const TemplateProvider: React.FC = ({ const Template = page.template ? findTemplate(page.template) : null - if (isDynamic) { + if (pathName && isDynamic) { jaenPageContext.id = dynamicPaths[pathName] }