Fixed bugsnag crash on web

This commit is contained in:
Bruno Lemos
2017-05-02 23:59:56 -03:00
parent 3e771df183
commit 76bc8d0593

View File

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