revert: "fix: handle maxCount negative value validation (#55129)" (#55303)

This reverts commit b59a1102f1.
This commit is contained in:
Peach
2025-10-14 17:10:03 +08:00
committed by GitHub
parent 72f26b3898
commit 117673d618

View File

@@ -125,7 +125,7 @@ const InternalUpload: React.ForwardRefRenderFunction<UploadRef, UploadProps> = (
// Cut to match count
if (maxCount === 1) {
cloneList = cloneList.slice(-1);
} else if (typeof maxCount === 'number' && Number.isFinite(maxCount) && maxCount > 0) {
} else if (maxCount) {
exceedMaxCount = cloneList.length > maxCount;
cloneList = cloneList.slice(0, maxCount);
}