]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix width/height check condition
authorEvan You <yyx990803@gmail.com>
Thu, 30 Nov 2023 10:33:53 +0000 (18:33 +0800)
committerEvan You <yyx990803@gmail.com>
Thu, 30 Nov 2023 10:34:06 +0000 (18:34 +0800)
packages/runtime-dom/src/patchProp.ts

index 56deb38a57e8bdf9e5bd319fe547b658bb91c388..e5883d18fca3d7c9090cf61c29cfe53822676dea 100644 (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'
     )
   }