chore: fix width/height check condition

This commit is contained in:
Evan You 2023-11-30 18:33:53 +08:00
parent 7cbcee3d83
commit 6fcec3b2c7
1 changed files with 5 additions and 2 deletions

View File

@ -113,8 +113,11 @@ function shouldSetAsProp(
// #8780 the width or heigth of embedded tags must be set as attribute
if (key === 'width' || key === 'height') {
const tag = el.tagName
return (
tag === 'IMG' || tag === 'VIDEO' || tag === 'CANVAS' || tag === 'SOURCE'
return !(
tag === 'IMG' ||
tag === 'VIDEO' ||
tag === 'CANVAS' ||
tag === 'SOURCE'
)
}