-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
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
domProps set to null or undefined are set to '' on update. #9650
domProps set to null or undefined are set to '' on update. #9650
Comments
This is expected because a dom prop is casted by the browser into a string |
@posva What browser casts dom props into strings? They're not attributes and not expressed as such, and I've been using |
It seems that now when |
Oh yeah, my bad was thinking about attributes
On Fri 8 Mar 2019 at 05:08, GU Yiling ***@***.***> wrote:
It seems that now when domProps are updated, undefined and null will be
converted to '' (empty string).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9650 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAoicbZ9UM5-BAkCGv2pEOy7wFR4ijx9ks5vUeJagaJpZM4bkMxV>
.
--
Eduardo San Martin Morote
|
@posva When the x value of domProps is set to undefined
Test Scenario 2
Also, if x value of domProps is set to null, the same result as above is displayed. I estimate the following.
|
Version
2.6.8
Reproduction link
https://jsfiddle.net/bqzu8crg/
Steps to reproduce
Since this change, whenever an element updates which has one of its domProps set to
undefined
ornull
, that prop is instead set to''
.All you need to do to reproduce it is render an element with properties in
domProps
set to null or undefined, and then update the component.What is expected?
The domProps values retain their correct types.
What is actually happening?
The domProps become strings, instead.
The text was updated successfully, but these errors were encountered: