Skip to content

Commit 8cbe4c2

Browse files
committed
fix: fix
1 parent 2bd4c61 commit 8cbe4c2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/AjaxUploader.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const AjaxUploader: React.FC<Readonly<React.PropsWithChildren<UploadProps>>> = p
4646
...otherProps
4747
} = props;
4848

49-
const [uid, setUid] = React.useState<string>(getUid());
49+
const [uid, setUid] = React.useState<string>(getUid);
5050
const [reqs, setReqs] = React.useState<Record<PropertyKey, any>>({});
5151

5252
const isMountedRef = React.useRef<boolean>(false);
@@ -68,11 +68,8 @@ const AjaxUploader: React.FC<Readonly<React.PropsWithChildren<UploadProps>>> = p
6868
if (reqs[key]?.abort) {
6969
reqs[key].abort();
7070
}
71-
setReqs(prev => {
72-
const { [key]: _, ...rest } = prev;
73-
return rest;
74-
});
7571
});
72+
setReqs({});
7673
}
7774
},
7875
[reqs],

0 commit comments

Comments
 (0)