Skip to content

Commit

Permalink
fix: don't start debugger on 404s (#9424)
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Mar 15, 2023
1 parent 5d9c670 commit 385bd49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dull-bears-destroy.md
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: don't start debugger on 404s
5 changes: 4 additions & 1 deletion packages/kit/src/runtime/client/client.js
Expand Up @@ -277,6 +277,9 @@ export function create_client(app, target) {
let navigation_result = intent && (await load_route(intent));

if (!navigation_result) {
if (is_external_url(url, base)) {
return await native_navigation(url);
}
navigation_result = await server_fallback(
url,
{ id: null },
Expand Down Expand Up @@ -1190,7 +1193,7 @@ export function create_client(app, target) {
});
}

if (__SVELTEKIT_DEV__) {
if (__SVELTEKIT_DEV__ && status !== 404) {
console.error(
'An error occurred while loading the page. This will cause a full page reload. (This message will only appear during development.)'
);
Expand Down

0 comments on commit 385bd49

Please sign in to comment.