mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-17 19:25:38 +08:00
Fixed bugsnag crash on web
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user