Skip to content

Commit

Permalink
fix(CompositeBar): remove NaN warning
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillDyachkovskiy committed Dec 21, 2023
1 parent 720b5e3 commit 3965243
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/CompositeBar/CompositeBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@ export const CompositeBar: FC<CompositeBarProps> = ({
{items.length !== 0 && (
<AutoSizer>
{(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 (
Expand Down

0 comments on commit 3965243

Please sign in to comment.