You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#1149
## What is this PR doing?
Checks if `event.reason` or `event.reason.stack` exist in
`logUnhandledRejection`.
## What problem is it solving?
Fixes a JS error when a promise without a reason is thrown.
## How is the problem addressed?
By checking if a reason is provided.
## Testing Instructions
- Checkout this branch
- Start Playground `npm run dev`
- Open Playground and execute this in the browser console
```
Promise.reject();
```
- Confirm that logger doesn't throw an error
The
logUnhandledRejections
code assumes thatevent.reason.stack
always exists, but we found a case whereevent.reason
was undefined.This can be recreated by opening this URL in Firefox.
If
event.reason
isn't available, we should log the data we have available.The text was updated successfully, but these errors were encountered: