fix(runtime-dom): properly handle style properties with undefined values (#5348)

fix #5322
This commit is contained in:
Thorsten Lünborg
2022-04-13 12:20:39 +02:00
committed by GitHub
parent f4d2c9fc6a
commit 85af139863
2 changed files with 13 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ function setStyle(
if (isArray(val)) {
val.forEach(v => setStyle(style, name, v))
} else {
if (val == null) val = ''
if (name.startsWith('--')) {
// custom property definition
style.setProperty(name, val)