Skip to content

Commit 97f9bf0

Browse files
committed
Don't show error when page is being unloaded
Fix sveltejs#981
1 parent b1c4585 commit 97f9bf0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sapper-dev-client.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ export function connect(port) {
2222
};
2323

2424
source.onerror = function(error) {
25-
console.error(error);
25+
// Don't show error when page is being unloaded
26+
setTimeout(() => {
27+
console.error('[SAPPER] dev client error', (error));
28+
})
2629
};
2730

2831
source.onmessage = function(event) {

0 commit comments

Comments
 (0)