-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(zone.js): do not mutate event listener options (may be readonly) (#…
…55796) Prior to this commit, event listener options were mutated directly, for example, `options.signal = undefined` or `options.once = false`. This issue arises in apps using third-party libraries where the responsibility lies with the library provider. Some libraries, like WalletConnect, pass an abort controller as `addEventListener` options. Because the abort controller has the `signal` property, this is a valid case. Thus, mutating options would throw an error since `signal` is a readonly property. Even though zone.js is being deprecated as Angular moves towards zoneless change detection, this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change detection because they rely on third-party libraries and are not responsible for the code used in them. Closes #54142 PR Close #55796
- Loading branch information
Showing
2 changed files
with
106 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters