fix: event should be optional (#51419)

* event should be optional

* revert ts
This commit is contained in:
Amumu 2024-10-29 17:22:43 +08:00 committed by GitHub
parent f0c39c6b3f
commit 8eee04b20f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,7 +85,7 @@ const InternalUploadList: React.ForwardRefRenderFunction<UploadListRef, UploadLi
if (!onPreview) {
return;
}
e.preventDefault();
e?.preventDefault();
return onPreview(file);
};