Skip to content

Commit

Permalink
fix: lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
nemo-shen committed Feb 18, 2024
1 parent bcd2554 commit 69e76a4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/core/useUpload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ export const useUpload = (options: UseUploadOptions): UseUploadReturn => {
} else {
uploadIndexes = [index]
}
files.value.forEach((file, index) => {
files.value.forEach((file: UseUploadFile, fileIndex) => {
if (!uploadIndexes.includes(index)) return
uploadFile({ url }, file.file).then((_result) => {
file.status = 'success'
files.value[fileIndex].status = 'success'
})
})
} else {
files.value.forEach((file, index) => {
files.value.forEach((file, fileIndex) => {
uploadFile({ url }, file.file).then((_result) => {
file.status = 'success'
files.value[fileIndex].status = 'success'
})
})
}
Expand Down Expand Up @@ -139,9 +139,9 @@ export const useUpload = (options: UseUploadOptions): UseUploadReturn => {
removeIndexes = [index]
}
if (
!removeIndexes.every((i) => {
return i < files.value.length
})
!removeIndexes.every((i) =>
i < files.value.length
)
) {
throw new Error('Index out of range.')
}
Expand Down

0 comments on commit 69e76a4

Please sign in to comment.