Skip to content

Commit

Permalink
fix: check version on node fetch fail (#8487)
Browse files Browse the repository at this point in the history
possibly related to #7071
  • Loading branch information
dummdidumm authored Jan 13, 2023
1 parent 5219410 commit 40464ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-pens-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: check version on node fetch fail
6 changes: 6 additions & 0 deletions packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,12 @@ export function create_client({ target, base }) {
status = err.status;
error = err.body;
} else {
// Referenced node could have been removed due to redeploy, check
const updated = await stores.updated.check();
if (updated) {
return await native_navigation(url);
}

error = await handle_error(err, { params, url, route: { id: route.id } });
}

Expand Down

0 comments on commit 40464ef

Please sign in to comment.