Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 5906167

Browse files
committed
fix(errors): skip HTTP errors
1 parent c319404 commit 5906167

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/ion-dev.js

+7
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,18 @@ window.IonicDevServer = {
3636
document.documentElement.classList.add('ion-diagnostics-cordova-ios');
3737
}
3838
}
39+
40+
window.onerror = function(msg, url, lineNo, columnNo, error) {
41+
self.handleError(error);
42+
};
3943
},
4044

4145
handleError: function(err) {
4246
if (!err) return;
4347

48+
// Ignore HTTP errors
49+
if(err.url || err.headers) return;
50+
4451
// Socket is ready so send this error to the server for prettifying
4552
if (this.socketReady) {
4653
var msg = {

0 commit comments

Comments
 (0)