Skip to content

Commit 20ad18f

Browse files
committed
only clear completed actions on navigation
1 parent ebdde8f commit 20ad18f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/heavy-bobcats-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solidjs/router": patch
3+
---
4+
5+
only clear completed actions on navigation

src/routing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export function createRouterContext(
330330
setReference(lastTransitionTarget.value);
331331
setState(lastTransitionTarget.state);
332332
resetErrorBoundaries();
333-
if (!isServer) submissions[1]([]);
333+
if (!isServer) submissions[1](subs => subs.filter(s => s.pending));
334334
}).finally(() => {
335335
if (lastTransitionTarget !== newTarget) return;
336336

0 commit comments

Comments
 (0)