Skip to content
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(runtime-core): set prop directly to value if failed to set empty string #1094

Closed
wants to merge 1 commit into from

Conversation

ycmjason
Copy link
Contributor

@ycmjason ycmjason commented May 1, 2020

This PR is a variation of #1092. Instead of creating the new element to check if it accept string, set the current element directly and catch type error.

I think this approach has a fallback tho: Some prop like <video>.volume will accept ''. So passing nullish value will mean setting volume to ''. Which is quite a weird behaviour imo.

fix #1049

@yyx990803 yyx990803 closed this in 20bc7ba May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.prop is casting null-ish values to empty strings
1 participant