Skip to content

Commit

Permalink
refactor: use Promise.all
Browse files Browse the repository at this point in the history
  • Loading branch information
Layouwen committed Nov 11, 2024
1 parent c14473c commit 07a2cdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/image-uploader/image-uploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const ImageUploader = forwardRef<ImageUploaderRef, ImageUploaderProps>(

setTasks(prev => [...getFinalTasks(prev), ...newTasks])
const newVal: ImageUploadItem[] = []
await Promise.allSettled(
await Promise.all(
newTasks.map(async (currentTask, index) => {
try {
const result = await props.upload(currentTask.file)
Expand Down

0 comments on commit 07a2cdd

Please sign in to comment.