-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
fix(forms): avoid issues with nulls checking on validation status and… #4338
Conversation
@@ -3,17 +3,17 @@ import {AbstractControl} from '../model'; | |||
export class AbstractControlDirective { | |||
get control(): AbstractControl { return null; } | |||
|
|||
get value(): any { return this.control.value; } | |||
get value(): any { return this.control != null ? this.control.value : null; } |
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.
could you use isPresent(this.control) instead?
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.
I can do that.
Maybe you can add an integration test that fails without the fix? |
d239ac3
to
ec20d17
Compare
Added an integration test, which does seem to pass. :) |
Merging PR #4338 on behalf of @alxhub to branch presubmit-alxhub-pr-4338. |
… other form states.
ec20d17
to
31410bf
Compare
Merging PR #4338 on behalf of @alxhub to branch presubmit-alxhub-pr-4338. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
… other form states.