From b76000f8282220b6d2c2544e4ace0fc9829ef776 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 27 Jul 2022 12:55:20 +0100 Subject: [PATCH] Fix issue showing selected component indicators on initial load sometimes due to null reference --- packages/client/src/components/preview/IndicatorSet.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/client/src/components/preview/IndicatorSet.svelte b/packages/client/src/components/preview/IndicatorSet.svelte index bbd03aa974..662741d100 100644 --- a/packages/client/src/components/preview/IndicatorSet.svelte +++ b/packages/client/src/components/preview/IndicatorSet.svelte @@ -72,6 +72,7 @@ // Sanity limit of 100 active indicators const children = Array.from(parents) .map(parent => parent?.children?.[0]) + .filter(x => x != null) .slice(0, 100) // If there aren't any nodes then reset