From 6172262be731989b4969fa602958dcb5e5076920 Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Mon, 14 Jun 2021 18:06:58 -0700 Subject: [PATCH] fix: sometimes the page doesn't have children (#19919) --- components/context/ProductLandingContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/context/ProductLandingContext.tsx b/components/context/ProductLandingContext.tsx index 9e8fdcc43e..dbfced3846 100644 --- a/components/context/ProductLandingContext.tsx +++ b/components/context/ProductLandingContext.tsx @@ -77,7 +77,7 @@ export const useProductLandingContext = (): ProductLandingContextT => { export const getProductLandingContextFromRequest = (req: any): ProductLandingContextT => { const productTree = req.context.currentProductTree const page = req.context.page - const hasGuidesPage = page.children.includes('/guides') + const hasGuidesPage = (page.children || []).includes('/guides') return { ...pick(page, [ 'title',