From ce056ab1ecf7f15492f8adea50043fec20054ef1 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Mon, 2 Dec 2024 15:11:50 +0100 Subject: [PATCH] type fix --- editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3a86b50f7e..ef3a4f164c 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts +++ b/editor.planx.uk/src/pages/FlowEditor/lib/store/preview.ts @@ -226,7 +226,7 @@ export const previewStore: StateCreator< .concat(existingValue) .reduce( (acc: string[], curr: string, _i: number, arr: string[]) => { - if (!arr.some((x) => x !== curr && x.startsWith(curr))) { + if (!arr.some((x) => x !== curr && x?.startsWith(curr))) { acc.push(curr); } return acc;