Skip to content

Commit 03b6166

Browse files
committed
Fix bug when making single request in job
1 parent 50e1da0 commit 03b6166

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/glance/widget-utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ func workerPoolDo[I any, O any](job *workerPoolJob[I, O]) ([]O, []error, error)
182182
}
183183

184184
if len(job.data) == 1 {
185-
output, err := job.task(job.data[0])
186-
return append(results, output), append(errs, err), nil
185+
results[0], errs[0] = job.task(job.data[0])
186+
return results, errs, nil
187187
}
188188

189189
tasksQueue := make(chan *workerPoolTask[I, O])

0 commit comments

Comments
 (0)