mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
fix fileList in onChange when uid is 0, close #11089
This commit is contained in:
parent
27c3093487
commit
4d5d3c142e
@ -196,7 +196,10 @@ export default class Upload extends React.Component<UploadProps, UploadState> {
|
||||
if (result === false) {
|
||||
this.onChange({
|
||||
file,
|
||||
fileList: uniqBy(this.state.fileList.concat(fileList.map(fileToObject)), (item: UploadFile) => item.uid),
|
||||
fileList: uniqBy(
|
||||
this.state.fileList.concat(fileList.map(fileToObject)),
|
||||
(item: UploadFile) => item.uid !== undefined
|
||||
),
|
||||
});
|
||||
return false;
|
||||
} else if (result && (result as PromiseLike<any>).then) {
|
||||
|
Loading…
Reference in New Issue
Block a user