fix: send extra error data

This commit is contained in:
Enix 2019-10-10 14:28:07 +08:00
parent db5526f50e
commit 70042d8b7d
No known key found for this signature in database
GPG key ID: FE06F5DFC1C9B8E4

View file

@ -41,12 +41,12 @@ function reportError(
return
}
Sentry.captureException(error)
if (extra) {
Sentry.withScope(scope => {
Sentry.withScope(scope => {
if (extra) {
Object.keys(extra).forEach(key => {
scope.setExtra(key, extra[key])
})
})
}
}
Sentry.captureException(error)
})
}