From 62b3fd5c8edd8201294dd8aa7b71b03874906e16 Mon Sep 17 00:00:00 2001 From: hexagon6 Date: Fri, 9 Dec 2022 16:50:07 +0100 Subject: [PATCH] fix: missing null check #389 (#390) --- packages/histoire-plugin-svelte/src/client/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/histoire-plugin-svelte/src/client/util.ts b/packages/histoire-plugin-svelte/src/client/util.ts index 9a715e5a..42f8e680 100644 --- a/packages/histoire-plugin-svelte/src/client/util.ts +++ b/packages/histoire-plugin-svelte/src/client/util.ts @@ -9,7 +9,7 @@ function cleanupState (state: Record): Record { if (typeof value === 'function') continue if (typeof value === 'undefined') continue if (value instanceof HTMLElement) continue - if (typeof value === 'object' && value.$$) continue + if (typeof value === 'object' && value?.$$) continue result[key] = value } return result