Skip to content

Commit 0c47e61

Browse files
committed
Change the use of addTask
1 parent 4172196 commit 0c47e61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FormHook/Form.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ extension FormControl {
447447
let (isValid, errors) = await withTaskGroup(of: KeyValidationResult.self) { group in
448448
var errors = instantFormState.errors
449449
for (key, field) in fields {
450-
group.addTask {
450+
_ = group.addTaskUnlessCancelled {
451451
let (isValid, messages) = await field.computeMessages()
452452
return KeyValidationResult(key: key, isValid: isValid, messages: messages)
453453
}

0 commit comments

Comments
 (0)