Skip to content

Commit

Permalink
fix: mark aborted/cancelled navigation as handled (#10666)
Browse files Browse the repository at this point in the history
fix #10660
fix #10665
  • Loading branch information
gtm-nayan committed Sep 1, 2023
1 parent f8e80cc commit d6df6c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-camels-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: mark aborted/cancelled navigation as handled
3 changes: 3 additions & 0 deletions packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,9 @@ function create_navigation(current, intent, url, type) {
reject = r;
});

// Handle any errors off-chain so that it doesn't show up as an unhandled rejection
complete.catch(() => {});

/** @type {import('@sveltejs/kit').Navigation} */
const navigation = {
from: {
Expand Down

0 comments on commit d6df6c5

Please sign in to comment.