From 74f90e6d57876aed56a12227fc94d3df1f5eca99 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 31 Mar 2017 21:45:20 -0500 Subject: [PATCH] chore(error): update ionic error handler --- src/util/ionic-error-handler.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util/ionic-error-handler.ts b/src/util/ionic-error-handler.ts index 0f7c6e4c3b..68eb683e5c 100644 --- a/src/util/ionic-error-handler.ts +++ b/src/util/ionic-error-handler.ts @@ -50,10 +50,14 @@ export class IonicErrorHandler extends ErrorHandler { handleError(err: any): void { super.handleError(err); try { - const devServer = (window)['IonicDevServer']; - if (devServer) { - devServer.handleError(err); - } + const win: any = window; + let monitor: any; + + monitor = win['IonicDevServer']; + monitor && monitor.handleError && monitor.handleError(err); + + monitor = (win['Ionic'] = win['Ionic'] || {}).Monitor; + monitor && monitor.handleError && monitor.handleError(err); } catch (e) {} } }