Skip to content

Commit

Permalink
chore: fix width/height check condition
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 30, 2023
1 parent 7cbcee3 commit 6fcec3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/runtime-dom/src/patchProp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
)
}

Expand Down

0 comments on commit 6fcec3b

Please sign in to comment.