diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts b/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts index 3781ba2348..6c7c682d97 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts +++ b/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts @@ -942,7 +942,7 @@ const collectedFlagValuesByCategory = ( if (breadcrumb.answers) { breadcrumb.answers.forEach((answerId) => { const node = flow[answerId]; - if (node.data?.flags) { + if (node?.data?.flags) { node.data.flags.forEach((flag: Flag["value"]) => { if (possibleFlagValues.includes(flag)) collectedFlags.push(flag); });