Skip to content

Commit

Permalink
fix: only skip hydration with vite overlay if current page is an error
Browse files Browse the repository at this point in the history
  • Loading branch information
gtm-nayan committed Apr 22, 2023
1 parent 3a8195d commit 8f5eb76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/shy-pears-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: only skip hydration with vite overlay if current page is an error
2 changes: 1 addition & 1 deletion packages/kit/src/runtime/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export function create_client(app, target) {

/** @param {import('./types').NavigationFinished} result */
function initialize(result) {
if (DEV && document.querySelector('vite-error-overlay')) return;
if (DEV && result.state.error && document.querySelector('vite-error-overlay')) return;

current = result.state;

Expand Down

0 comments on commit 8f5eb76

Please sign in to comment.