[FIX] Only log to bugsnag if type is error (#1168)

This commit is contained in:
Djorkaeff Alexandre 2019-08-31 16:22:58 -03:00 committed by Diego Mello
parent 356a3e7098
commit 94ede08c43
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}
};