🐛 Fix IE9 throw File not defined (#18115)

close #18109
pull/18159/head
偏右 6 years ago committed by zombieJ
parent 187f8f8372
commit cf44d44f0f

@ -26,15 +26,12 @@ export default class UploadList extends React.Component<UploadListProps, any> {
return;
}
(items || []).forEach(file => {
const isValidateFile =
file.originFileObj instanceof File || file.originFileObj instanceof Blob;
if (
typeof document === 'undefined' ||
typeof window === 'undefined' ||
!(window as any).FileReader ||
!(window as any).File ||
!isValidateFile ||
!(file.originFileObj instanceof File || file.originFileObj instanceof Blob) ||
file.thumbUrl !== undefined
) {
return;

Loading…
Cancel
Save