Skip to content

Commit 69c10b6

Browse files
committed
Fixed cancel in subsequent events
1 parent 2c69266 commit 69c10b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/client/superForm.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ export function superForm<
16181618
? { type: 'success', status, data }
16191619
: { type: 'failure', status, data };
16201620

1621-
setTimeout(() => validationResponse({ result }, cancelled), 0);
1621+
setTimeout(() => validationResponse({ result }), 0);
16221622
}
16231623

16241624
function cancel(
@@ -1773,7 +1773,8 @@ export function superForm<
17731773
return chunks;
17741774
}
17751775

1776-
async function validationResponse(event: ValidationResponse, cancelled = false) {
1776+
async function validationResponse(event: ValidationResponse) {
1777+
let cancelled = false;
17771778
currentRequest = null;
17781779

17791780
// Check if an error was thrown in hooks, in which case it has no type.

0 commit comments

Comments
 (0)