File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -202,8 +202,7 @@ export function createComponent(
202202 if (
203203 ( isSingleRoot ||
204204 // transition has attrs fallthrough
205- ( parentInstance &&
206- getComponentName ( parentInstance ! . type ) === 'VaporTransition' ) ) &&
205+ ( parentInstance && isVaporTransition ( parentInstance ! . type ) ) ) &&
207206 component . inheritAttrs !== false &&
208207 isVaporComponent ( parentInstance ) &&
209208 parentInstance . hasFallthrough
@@ -412,7 +411,7 @@ export function setupComponent(
412411 if ( root ) {
413412 renderEffect ( ( ) => {
414413 const attrs =
415- isFunction ( component ) && component . displayName !== 'VaporTransition'
414+ isFunction ( component ) && ! isVaporTransition ( component )
416415 ? getFunctionalFallthrough ( instance . attrs )
417416 : instance . attrs
418417 if ( attrs ) applyFallthroughProps ( root , attrs )
@@ -915,3 +914,7 @@ export function getRootElement(
915914 return hasComment ? singleRoot : undefined
916915 }
917916}
917+
918+ function isVaporTransition ( component : VaporComponent ) : boolean {
919+ return getComponentName ( component ) === 'VaporTransition'
920+ }
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const decorate = (t: typeof VaporTransition) => {
4444}
4545
4646export const VaporTransition : FunctionalVaporComponent = /*@__PURE__ */ decorate (
47- ( props , { slots, attrs } ) => {
47+ ( props , { slots } ) => {
4848 // wrapped <transition appear>
4949 let resetDisplay : Function | undefined
5050 if (
Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ export class DynamicFragment extends VaporFragment {
190190 }
191191
192192 // switch current instance to parent instance during update
193+ // ensure that the parent instance is correct for nested components
193194 let prev
194195 if ( this . parentComponent && parent )
195196 prev = setCurrentInstance ( this . parentComponent )
@@ -207,7 +208,7 @@ export class DynamicFragment extends VaporFragment {
207208 }
208209
209210 if ( parent ) {
210- // fallthrough attrs
211+ // apply fallthrough props during update
211212 if ( this . attrs ) {
212213 if ( this . nodes instanceof Element ) {
213214 renderEffect ( ( ) =>
You can’t perform that action at this time.
0 commit comments