File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ const isNativeOn = (key: string) =>
13
13
key . charCodeAt ( 2 ) > 96 &&
14
14
key . charCodeAt ( 2 ) < 123
15
15
16
- const embeddedTags = [ 'IMG' , 'VIDEO' , 'CANVAS' , 'SOURCE' ]
17
-
18
16
type DOMRendererOptions = RendererOptions < Node , Element >
19
17
20
18
export const patchProp : DOMRendererOptions [ 'patchProp' ] = (
@@ -113,11 +111,11 @@ function shouldSetAsProp(
113
111
}
114
112
115
113
// #8780 the width or heigth of embedded tags must be set as attribute
116
- if (
117
- ( key === 'width' || key === 'height' ) &&
118
- embeddedTags . includes ( el . tagName )
119
- ) {
120
- return false
114
+ if ( key === 'width' || key === 'height' ) {
115
+ const tag = el . tagName
116
+ return (
117
+ tag === 'IMG' || tag === 'VIDEO' || tag === 'CANVAS' || tag === 'SOURCE'
118
+ )
121
119
}
122
120
123
121
// native onclick with string value, must be set as attribute
You can’t perform that action at this time.
0 commit comments