From ec96740c0a442d6fefa585bdcfa23dc97673f7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Mon, 2 Dec 2024 11:22:24 +0000 Subject: [PATCH] fix: Handle nodes without more info fields --- .../pages/FlowEditor/components/Flow/components/Checklist.tsx | 2 +- .../pages/FlowEditor/components/Flow/components/Question.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Checklist.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Checklist.tsx index eacbadf534..c808450e69 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Checklist.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Checklist.tsx @@ -79,7 +79,7 @@ const Checklist: React.FC = React.memo((props) => { const Icon = ICONS[props.type]; const hasHelpText = - props.data.policyRef || props.data.info || props.data.howMeasured; + props.data?.policyRef || props.data?.info || props.data?.howMeasured; return ( <> diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Question.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Question.tsx index cc73a9600c..30b80ff3d0 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Question.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Question.tsx @@ -63,7 +63,7 @@ const Question: React.FC = React.memo((props) => { const iconTitleAccess = props.type === "Error" ? "Error" : undefined; const hasHelpText = - props.data.policyRef || props.data.info || props.data.howMeasured; + props.data?.policyRef || props.data?.info || props.data?.howMeasured; return ( <>