Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

fix(patch): fix #886, #885, patchOnProperties getter should return original listener. #887

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

JiaLiPassion
Copy link
Collaborator

@JiaLiPassion JiaLiPassion commented Aug 25, 2017

fix #886.
fix #885.
fix angular/angular-cli#7502.
patchOnProperties getter should return original listener.

the issue can be described as following code.

  const req = new XMLHttpRequest();
         req.open('get', '/', true);
         const listener = req.onreadystatechange = function() {
           if (req.readyState === 4) {
             done();
           }
         };
         expect(req.onreadystatechange).toBe(listener);
         req.onreadystatechange = function() {
           return listener.apply(this, arguments);
         };
         req.send();

when try to get onProperty listener with such as const listener = req.onreadystatechange, should not return wrapFn but the real listener.

@JiaLiPassion JiaLiPassion changed the title fix(patch): fix #886, patchOnProperties getter should return original listener. fix(patch): fix #886, #885, patchOnProperties getter should return original listener. Aug 26, 2017
@andrew-donovan
Copy link

Any ETA on this ? We currently have to force 0.8.16 in our project (17 is breaking)

Copy link

@matt-filion matt-filion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a regular contributor here but these changes seem fairly safe and are paired with a valid test case.

@mhevery mhevery merged commit d4e5ae8 into angular:master Sep 6, 2017
tidusjar pushed a commit to Ombi-app/Ombi that referenced this pull request Sep 18, 2017
* Latest practices

* Lock zone.js to 0.8.16 (for now, see angular/zone.js#887 )

* Use es6-compatible minifier

* Attempt to fix pull req appveyor builds

* Attempt build fix again

* Remove cake gulp publish task - not needed anymore

* Use bootswatch

and remove unused bootstrap dependency

* Add bootstrap

* Fix things
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
7 participants