From 396524399c79de2e297d88bc4f6e2d699154ec7d Mon Sep 17 00:00:00 2001 From: kirillmohno Date: Thu, 21 Dec 2023 14:44:49 +0300 Subject: [PATCH] fix(CompositeBar): remove NaN warning --- src/components/CompositeBar/CompositeBar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/CompositeBar/CompositeBar.tsx b/src/components/CompositeBar/CompositeBar.tsx index eb42dee..5e99075 100644 --- a/src/components/CompositeBar/CompositeBar.tsx +++ b/src/components/CompositeBar/CompositeBar.tsx @@ -252,12 +252,12 @@ export const CompositeBar: FC = ({ {items.length !== 0 && ( {(size: Size) => { - const width = Number.isNaN(size.width) ? undefined : size.width; - const height = Number.isNaN(size.height) ? undefined : size.height; + const width = Number.isNaN(size.width) ? 0 : size.width; + const height = Number.isNaN(size.height) ? 0 : size.height; const {listItems, collapseItems} = getAutosizeListItems( items, - height || 0, + height, collapseItem, ); return (