File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -381,10 +381,7 @@ export function setupComponent(
381381 component . inheritAttrs !== false &&
382382 Object . keys ( instance . attrs ) . length
383383 ) {
384- const el = getRootElement ( instance )
385- if ( el ) {
386- renderEffect ( ( ) => applyFallthroughProps ( el , instance . attrs ) )
387- }
384+ renderEffect ( ( ) => applyFallthroughProps ( instance . block , instance . attrs ) )
388385 }
389386
390387 setActiveSub ( prevSub )
@@ -402,9 +399,12 @@ export function applyFallthroughProps(
402399 block : Block ,
403400 attrs : Record < string , any > ,
404401) : void {
405- isApplyingFallthroughProps = true
406- setDynamicProps ( block as Element , [ attrs ] )
407- isApplyingFallthroughProps = false
402+ const el = getRootElement ( block )
403+ if ( el ) {
404+ isApplyingFallthroughProps = true
405+ setDynamicProps ( el , [ attrs ] )
406+ isApplyingFallthroughProps = false
407+ }
408408}
409409
410410/**
@@ -761,9 +761,7 @@ export function getExposed(
761761 }
762762}
763763
764- function getRootElement ( {
765- block,
766- } : VaporComponentInstance ) : Element | undefined {
764+ function getRootElement ( block : Block ) : Element | undefined {
767765 if ( block instanceof Element ) {
768766 return block
769767 }
You can’t perform that action at this time.
0 commit comments