-
Notifications
You must be signed in to change notification settings - Fork 26.3k
fix(core): Wrap ErrorEvent with no error property #62081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
392de4c
to
ed8d8bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A test would be nice to have this accounted for in coverage
ed8d8bf
to
b6451b6
Compare
@@ -65,4 +65,34 @@ describe('ErrorHandler', () => { | |||
expect(spy.calls.count()).toBe(1); | |||
window.onerror = originalWindowOnError; | |||
}); | |||
|
|||
it('installs global error handler once', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"handles error events without error"
This commit updates the global error listener to wrap the global ErrorEvent in a new Error with cause if the error property is undefined. fixes angular#62078
b6451b6
to
bd914c2
Compare
This PR was merged into the repository by commit 572c32a. The changes were merged into the following branches: main, 20.0.x |
This commit updates the global error listener to wrap the global ErrorEvent in a new Error with cause if the error property is undefined.
fixes #62078