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:
parent
ea8fa580be
commit
4d66223f5c
@ -101,6 +101,9 @@ export default function setupSentry ({ release, getState }) {
|
|||||||
// append app state
|
// append app state
|
||||||
if (getState) {
|
if (getState) {
|
||||||
const appState = getState()
|
const appState = getState()
|
||||||
|
if (!report.extra) {
|
||||||
|
report.extra = {}
|
||||||
|
}
|
||||||
report.extra.appState = appState
|
report.extra.appState = appState
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user