From 2342831104abe6f90551585180aca196f75b6f4e Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 13 Mar 2017 11:00:26 -0400 Subject: [PATCH] fix(GUI): avoid duplicated TrackJS errors (#1176) I've noticed that errors reported to TrackJS appear twice. Turns out that TrackJS pipes output of `console.error()` as errors, rather than as extra logging. The `AnalyticsService.logException()` function reports the exception to TrackJS using `$window.trackJS.track()`, but then prints it to `stderr` as well (so it appears on DevTools), causing TrackJS to report that one too. The solution is to disable the `console.error` boolean property of the `_trackJs` object. From the TrackJS documentation: ``` // By default any calls to console.error() will automatically trigger an // error. Set this to false if you don't want console.error() to // trigger errors. error: true, ``` See: http://docs.trackjs.com/tracker/configuration Signed-off-by: Juan Cruz Viotti --- lib/gui/index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/gui/index.html b/lib/gui/index.html index 56728a19..2f4e398e 100644 --- a/lib/gui/index.html +++ b/lib/gui/index.html @@ -14,7 +14,10 @@