fix(frontend): optional chaining for abortController
All checks were successful
Automated Container Build / build-and-push (push) Successful in 47s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 47s
This commit is contained in:
parent
bf9db781dc
commit
d9433a7a96
1 changed files with 2 additions and 2 deletions
|
|
@ -938,10 +938,10 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
const uploadPath = path ? (destPath === '.' ? path : `${destPath}/${path}`) : destPath;
|
||||
|
||||
try {
|
||||
if (newBatch.abortController.signal.aborted) throw new Error('Upload canceled');
|
||||
if (newBatch.abortController?.signal?.aborted) throw new Error('Upload canceled');
|
||||
await api.upload(file, uploadPath, {
|
||||
overwrite,
|
||||
signal: newBatch.abortController.signal,
|
||||
signal: newBatch.abortController?.signal,
|
||||
onProgress: (percent) => {
|
||||
fileProgressMap.set(file.name + path, (percent / 100) * file.size);
|
||||
updateProgress();
|
||||
|
|
|
|||
Reference in a new issue