Skip to content

Commit

Permalink
fixes oceanabse/odc#597
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Oct 25, 2023
1 parent 1968198 commit e99010e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ const SingleUpload: React.FC<IProps> = function ({
}) {
const [innerFile, _setInnerFile] = useState<UploadFile>(null);
function setInnerFile(file: UploadFile) {
if (file?.uid !== value) {
_setInnerFile(file);
if (file?.uid !== value && !['error', 'uploading'].includes(file?.status)) {
const objectId = file?.response?.data?.contents?.[0]?.objectId;
onChange(objectId);
}
_setInnerFile(file);
}
useEffect(() => {
if (value) {
Expand Down

0 comments on commit e99010e

Please sign in to comment.