From 76bc8d05931bc027b9a152b10e2dbb6712ab9bac Mon Sep 17 00:00:00 2001 From: Bruno Lemos Date: Tue, 2 May 2017 23:59:56 -0300 Subject: [PATCH] Fixed bugsnag crash on web --- src/libs/bugsnag/index.web.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libs/bugsnag/index.web.js b/src/libs/bugsnag/index.web.js index 54247a39..b3973f85 100644 --- a/src/libs/bugsnag/index.web.js +++ b/src/libs/bugsnag/index.web.js @@ -5,6 +5,15 @@ import Bugsnag from 'bugsnag-js' export default apiKey => { Bugsnag.apiKey = apiKey + + Bugsnag.clearUser = () => (Bugsnag.user = null) + + Bugsnag.setUser = (id, name, email, other = {}) => + (Bugsnag.user = { id, name, email, ...other }) + + Bugsnag.notify = Bugsnag.notifyException + delete Bugsnag.notifyException + return Bugsnag }