mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix: remove redundant transformations in ``UploadList
``, which led to decrease in performance (#49598)
* fix: remove unnecessary transformations for upload list with previews * chore: revert miss convert --------- Co-authored-by: 二货机器人 <smith3816@gmail.com>
This commit is contained in:
parent
4145305b16
commit
9ce5cbcf64
@ -63,11 +63,12 @@ const InternalUploadList: React.ForwardRefRenderFunction<UploadListRef, UploadLi
|
||||
typeof window === 'undefined' ||
|
||||
!(window as any).FileReader ||
|
||||
!(window as any).File ||
|
||||
!(file.originFileObj instanceof File || file.originFileObj) ||
|
||||
!(file.originFileObj instanceof File || (file.originFileObj as any) instanceof Blob) ||
|
||||
file.thumbUrl !== undefined
|
||||
) {
|
||||
return;
|
||||
}
|
||||
file.thumbUrl = '';
|
||||
if (previewFile) {
|
||||
previewFile(file.originFileObj as File).then((previewDataUrl: string) => {
|
||||
// Need append '' to avoid dead loop
|
||||
|
Loading…
Reference in New Issue
Block a user