Skip to content

Commit 6fcec3b

Browse files
committed
chore: fix width/height check condition
1 parent 7cbcee3 commit 6fcec3b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/runtime-dom/src/patchProp.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@ function shouldSetAsProp(
113113
// #8780 the width or heigth of embedded tags must be set as attribute
114114
if (key === 'width' || key === 'height') {
115115
const tag = el.tagName
116-
return (
117-
tag === 'IMG' || tag === 'VIDEO' || tag === 'CANVAS' || tag === 'SOURCE'
116+
return !(
117+
tag === 'IMG' ||
118+
tag === 'VIDEO' ||
119+
tag === 'CANVAS' ||
120+
tag === 'SOURCE'
118121
)
119122
}
120123

0 commit comments

Comments
 (0)