diff --git a/packages/create-puck-app/templates/next/app/[...puckPath]/page.tsx b/packages/create-puck-app/templates/next/app/[...puckPath]/page.tsx index 7336964063..40700a8bb7 100644 --- a/packages/create-puck-app/templates/next/app/[...puckPath]/page.tsx +++ b/packages/create-puck-app/templates/next/app/[...puckPath]/page.tsx @@ -28,7 +28,7 @@ export async function generateMetadata({ } return { - title: getPage(path).root.title, + title: getPage(path)?.root.title, }; } diff --git a/recipes/next/app/[...puckPath]/page.tsx b/recipes/next/app/[...puckPath]/page.tsx index 7336964063..40700a8bb7 100644 --- a/recipes/next/app/[...puckPath]/page.tsx +++ b/recipes/next/app/[...puckPath]/page.tsx @@ -28,7 +28,7 @@ export async function generateMetadata({ } return { - title: getPage(path).root.title, + title: getPage(path)?.root.title, }; }