mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
sentry - setupRaven - ensure message is truthy
This commit is contained in:
parent
22e59af741
commit
f41198fbb6
@ -66,11 +66,11 @@ function simplifyErrorMessages(report) {
|
||||
|
||||
function rewriteErrorMessages(report, rewriteFn) {
|
||||
// rewrite top level message
|
||||
report.message = rewriteFn(report.message)
|
||||
if (typeof report.message === 'string') report.message = rewriteFn(report.message)
|
||||
// rewrite each exception message
|
||||
if (report.exception && report.exception.values) {
|
||||
report.exception.values.forEach(item => {
|
||||
item.value = rewriteFn(item.value)
|
||||
if (typeof item.value === 'string') item.value = rewriteFn(item.value)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user