Skip to content

Commit 0c0b1fd

Browse files
committed
fix: maxCount should be a number
1 parent 8f3a872 commit 0c0b1fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Overflow.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ function Overflow<ItemType = any>(
7171
/**
7272
* When is `responsive`, we will always render rest node to get the real width of it for calculation
7373
*/
74-
const showRest = isResponsive || data.length > maxCount!;
74+
const showRest =
75+
isResponsive || (typeof maxCount === 'number' && data.length > maxCount);
7576

7677
const mergedData = useMemo(() => {
7778
let items = data;

0 commit comments

Comments
 (0)