From: Evan You Date: Thu, 30 Nov 2023 10:33:53 +0000 (+0800) Subject: chore: fix width/height check condition X-Git-Tag: v3.3.10~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fcec3b2c71ec86f1be54f587d4e7dfb107debb7;p=thirdparty%2Fvuejs%2Fcore.git chore: fix width/height check condition --- diff --git a/packages/runtime-dom/src/patchProp.ts b/packages/runtime-dom/src/patchProp.ts index 56deb38a57..e5883d18fc 100644 --- a/packages/runtime-dom/src/patchProp.ts +++ b/packages/runtime-dom/src/patchProp.ts @@ -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' ) }