fix(forms): number inputs should report null when blank#8141
fix(forms): number inputs should report null when blank#8141kara wants to merge 1 commit intoangular:masterfrom
Conversation
There was a problem hiding this comment.
If the value is 0 then value == '' will also be true. Using === instead would fix it.
There was a problem hiding this comment.
The value reported comes from the HTML element, so it will always be a string ('0' not 0). Because of that, '0' won't be == to ''. We could use looseIdentity from the Dart facade (=== won't work with Dart), but not sure it's necessary in this case.
That said, I should probably add the '0' case to one of the tests. Thanks for pointing it out :-)
|
Merging PR #8141 on behalf of @robertmesserle to branch presubmit-robertmesserle-pr-8141. |
|
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. |
Fixes #6932