From 572a05c1236e50ca99c4b22a4174b60b8d510aef Mon Sep 17 00:00:00 2001 From: Lucas Costi Date: Tue, 15 Jun 2021 11:01:10 +1000 Subject: [PATCH 1/2] Fix REST decorator for false default params (#19883) --- includes/rest_operation.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/rest_operation.html b/includes/rest_operation.html index 25a1fc2336..b75231a74d 100644 --- a/includes/rest_operation.html +++ b/includes/rest_operation.html @@ -55,7 +55,7 @@ {{ param.in }} {{ param.descriptionHTML }} - {% if param.schema.default %} + {% if param.schema.default != nil %} Default: {{ param.schema.default }} {% endif %} @@ -68,7 +68,7 @@ {{ bodyParam.in }} {{ bodyParam.description }} - {% if bodyParam.default %} + {% if bodyParam.default != nil %} Default: {{ bodyParam.default }} {% endif %} From 6172262be731989b4969fa602958dcb5e5076920 Mon Sep 17 00:00:00 2001 From: Mike Surowiec Date: Mon, 14 Jun 2021 18:06:58 -0700 Subject: [PATCH 2/2] 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',