From 94ede08c4356ce97898f0794cc28eb4e470de790 Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Sat, 31 Aug 2019 16:22:58 -0300 Subject: [PATCH] [FIX] Only log to bugsnag if type is error (#1168) --- app/utils/log.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/utils/log.js b/app/utils/log.js index b83af1f5..fb964e14 100644 --- a/app/utils/log.js +++ b/app/utils/log.js @@ -8,4 +8,10 @@ export const { analytics } = firebase; export const loggerConfig = bugsnag.config; export const { leaveBreadcrumb } = bugsnag; -export default bugsnag.notify; +export default (e) => { + if (e instanceof Error) { + bugsnag.notify(e); + } else { + console.log(e); + } +};