mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
Fix file.response type checking, ref #6818
This commit is contained in:
parent
8892d85e33
commit
a329d3d39b
@ -155,7 +155,7 @@ export default class UploadList extends React.Component<UploadListProps, any> {
|
||||
? <span className={`${prefixCls}-list-item-actions`}>{previewIcon}{removeIcon}</span>
|
||||
: removeIconCross;
|
||||
let message;
|
||||
if (file.response && React.isValidElement(file.response)) {
|
||||
if (file.response && typeof file.response === 'string') {
|
||||
message = file.response;
|
||||
} else {
|
||||
message = (file.error && file.error.statusText) || locale.uploadError;
|
||||
|
Loading…
Reference in New Issue
Block a user