From 1c33bb6e96b9819a4643cee72c5d68dac13d6c82 Mon Sep 17 00:00:00 2001 From: JulienMora Date: Tue, 20 Aug 2024 15:58:17 +0200 Subject: [PATCH] update --- packages/react/components/accordion/item/AccordionItem.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/react/components/accordion/item/AccordionItem.tsx b/packages/react/components/accordion/item/AccordionItem.tsx index 7139b44d..2ae99553 100644 --- a/packages/react/components/accordion/item/AccordionItem.tsx +++ b/packages/react/components/accordion/item/AccordionItem.tsx @@ -1,7 +1,6 @@ import React, { useEffect, useRef, useState } from "react" import shortid from "shortid" import { AccordionItemProps } from "./AccordionItemProps" -import { is } from "@/services" import clsx from "clsx" import { hashClass } from "@/helpers" import { useTrilogyContext } from "@/context" @@ -48,7 +47,7 @@ const AccordionItem = ({ return } const { floor, abs } = Math - const firstChild = e.children[1].firstChild as HTMLElement + const firstChild = e?.children[1]?.firstChild as HTMLElement const expandedInactive = floor( abs(e.clientHeight + firstChild?.clientHeight) ).toString()