Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix(ngModel): form validation and Object.prototype enumerable values #12075

Closed
wants to merge 1 commit into from

Conversation

lgalfaso
Copy link
Contributor

When adding an Object.prototype enumerable property, this should not be confused
as a form error

Closes #12066

…rable value

When adding an Object.prototype enumerable property, this should not be confused
as a form error

Closes angular#12066
expect(formCtrl.$invalid).toBe(false);
delete Object.prototype.someThing;

dealoc(element);
Copy link
Member

Choose a reason for hiding this comment

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

Theoretically not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and in practice, generates the error "Error: Found jqCache references that were not deallocated! count: 1"

Keep in mind that this is a new element (not the global one)

Copy link
Member

Choose a reason for hiding this comment

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

Right !
Why not reuse the global element then ? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The global element is already compiled with a content that is not good for this test. This same thing is done for other tests in the same file.

Copy link
Member

Choose a reason for hiding this comment

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

I should have taken a more detailed look :)
(Sorry for the noise...)

@lgalfaso
Copy link
Contributor Author

landed as 0934b76

@lgalfaso lgalfaso closed this Jun 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants