-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(text-field): correctly check _initialHeight #17900
Conversation
5c2208c
to
22e0c74
Compare
TypeScript 3.7 flags the assignment on line 250 because `style.height` must not be `null`. The underlying reason though appears to be that the comparison checks against `=== undefined`, where the field only declares `null` as an option, thus TS complains that the value might still be `null`. This change just spills a bunch of `any` over the code to get it to compile in both 3.6 and 3.7. The casts shoulb be removed once the code is migrated.
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.
The changes LGTM, but it looks like it broke one of the tests.
22e0c74
to
57399ac
Compare
@crisbeto ack, I apparently pushed a fix to the wrong remote branch. Should be good now I hope. |
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.
LGTM
Marking as merge safe because it only changes the type of a private property to |
FYI, in the future, the correct commit message would be
Due to this commit message issue, the release notes include this change in |
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. |
TypeScript 3.7 flags the assignment on line 250 because
style.height
must not benull
.The underlying reason though appears to be that the comparison checks against
=== undefined
, where the field only declaresnull
as an option. The field is not initialized, soundefined
is the correct value to compare to and type to use.