fix(patches/log-promise-rejections): use falsy check instead of strict equal
This commit is contained in:
parent
99d7dc0111
commit
e587c527f8
1 changed files with 3 additions and 2 deletions
|
|
@ -13,12 +13,13 @@ Promise._m = (promise, err) => {
|
|||
if (err)
|
||||
setTimeout(
|
||||
() =>
|
||||
promise._h === 0 &&
|
||||
// (if promise._h is 0)
|
||||
!promise._h &&
|
||||
nativeLoggingHook(
|
||||
`\u001b[33mUnhandled promise rejection: ${getErrorStack(err)}\u001b[0m`,
|
||||
2,
|
||||
),
|
||||
ErrorTypeWhitelist.some(it => err instanceof it) ? 0 : 2000,
|
||||
// The time is completely arbitary. I've picked what Hermes chose.
|
||||
ErrorTypeWhitelist.some(it => err instanceof it) ? 0 : 2000,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue