From 97796a45b65c375afd9564455b543345f52a5437 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 15 Jan 2021 23:24:09 +0800 Subject: [PATCH] feat(upload): support Error obj (message) (#28716) --- components/upload/UploadList/ListItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/upload/UploadList/ListItem.tsx b/components/upload/UploadList/ListItem.tsx index 4956fb58c1..ca9bb03931 100644 --- a/components/upload/UploadList/ListItem.tsx +++ b/components/upload/UploadList/ListItem.tsx @@ -220,7 +220,7 @@ const ListItem = React.forwardRef( if (file.response && typeof file.response === 'string') { message = file.response; } else { - message = (file.error && file.error.statusText) || locale.uploadError; + message = file.error?.statusText || file.error?.message || locale.uploadError; } const iconAndPreview = (