From 07882a6447fa1b3e6cea8f781947e27577c2dcef Mon Sep 17 00:00:00 2001 From: Nicolas Merget Date: Wed, 25 Sep 2024 11:41:45 +0200 Subject: [PATCH] fix: issue with typescript --- packages/components/src/components/accordion/accordion.lite.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/components/accordion/accordion.lite.tsx b/packages/components/src/components/accordion/accordion.lite.tsx index 04f170cfea1..71f146422e3 100644 --- a/packages/components/src/components/accordion/accordion.lite.tsx +++ b/packages/components/src/components/accordion/accordion.lite.tsx @@ -88,7 +88,7 @@ export default function DBAccordion(props: DBAccordionProps) { onUpdate(() => { if (ref && state._initOpenIndexDone) { - if (props.initOpenIndex?.length > 0) { + if (props?.initOpenIndex && props.initOpenIndex?.length > 0) { const childDetails = ref.getElementsByTagName('details'); if (childDetails) { const initOpenIndex =