Skip to content

Commit 1c26a0e

Browse files
bugfix?
1 parent 7ac87ff commit 1c26a0e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/lib/client/form.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { isElementInViewport, scrollToAndCenter } from './elements.js';
2-
import type { FormOptions } from './superForm.js';
1+
import { afterNavigate } from '$app/navigation';
32
import { onDestroy, tick } from 'svelte';
43
import type { Writable } from 'svelte/store';
4+
import { isElementInViewport, scrollToAndCenter } from './elements.js';
5+
import type { FormOptions } from './superForm.js';
56

67
enum FetchStatus {
78
Idle = 0,
@@ -120,6 +121,11 @@ export function Form<T extends Record<string, unknown>, M>(
120121
completed({ cancelled: true });
121122
});
122123

124+
afterNavigate(() => {
125+
ErrorTextEvents_removeErrorTextListeners();
126+
completed({ cancelled: true });
127+
})
128+
123129
return {
124130
submitting() {
125131
Timers_start();

0 commit comments

Comments
 (0)