Skip to content

Commit 875e9dc

Browse files
committed
Merge branch 'main' of github.com:ciscoheat/sveltekit-superforms
2 parents 1254848 + c26c0b0 commit 875e9dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/client/superForm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export type FormOptions<
9595
errorSelector: string;
9696
selectErrorText: boolean;
9797
stickyNavbar: string;
98-
taintedMessage: string | boolean | null | (() => MaybePromise<boolean>);
98+
taintedMessage: string | boolean | null | ((nav: BeforeNavigate) => MaybePromise<boolean>);
9999
/**
100100
* Enable single page application (SPA) mode.
101101
* **The string and failStatus options are deprecated** and will be removed in the next major release.
@@ -1227,7 +1227,7 @@ export function superForm<
12271227
// - resolved with false => shouldRedirect = false
12281228
// - resolved with true => shouldRedirect = true
12291229
shouldRedirect = isTaintedFunction
1230-
? await taintedMessage()
1230+
? await taintedMessage(nav)
12311231
: window.confirm(message || Tainted.defaultMessage);
12321232
} catch {
12331233
shouldRedirect = false;

0 commit comments

Comments
 (0)