Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure PromiseRejectionEvent has reason before logging it (#1150)
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
- Loading branch information