Updating logging to typescript to fix build issue.
This commit is contained in:
parent
fee6ca4cfb
commit
35ed1baeca
|
@ -1,10 +1,10 @@
|
|||
const NonErrors = ["AccountError"]
|
||||
|
||||
function isSuppressed(e) {
|
||||
function isSuppressed(e?: any) {
|
||||
return e && e["suppressAlert"]
|
||||
}
|
||||
|
||||
module.exports.logAlert = (message, e = null) => {
|
||||
export function logAlert(message: string, e?: any) {
|
||||
if (e && NonErrors.includes(e.name) && isSuppressed(e)) {
|
||||
return
|
||||
}
|
||||
|
@ -14,3 +14,7 @@ module.exports.logAlert = (message, e = null) => {
|
|||
}
|
||||
console.error(`bb-alert: ${message} ${errorJson}`)
|
||||
}
|
||||
|
||||
export default {
|
||||
logAlert,
|
||||
}
|
Loading…
Reference in New Issue