1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Initialize extra report property (#9033)

The `extra` property of errors sent to Sentry is sometimes not
initialized when we add the application state. A check has been added
to initialize it if it's missing.

I suspect that this changed with v5 of `@sentry/browser`, though I
can't find any explicit confirmation of this in their changelog.
This commit is contained in:
Mark Stacey 2020-07-17 20:31:18 -03:00 committed by GitHub
parent ea8fa580be
commit 4d66223f5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,9 @@ export default function setupSentry ({ release, getState }) {
// append app state
if (getState) {
const appState = getState()
if (!report.extra) {
report.extra = {}
}
report.extra.appState = appState
}
} catch (err) {