From 6fcec3b2c71ec86f1be54f587d4e7dfb107debb7 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 30 Nov 2023 18:33:53 +0800 Subject: [PATCH] chore: fix width/height check condition --- packages/runtime-dom/src/patchProp.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/runtime-dom/src/patchProp.ts b/packages/runtime-dom/src/patchProp.ts index 56deb38a57e..e5883d18fca 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' ) }