@@ -189,8 +189,7 @@ private function compileComponent(): ImmutableString
189189 // If the component template itself uses :apply= anywhere, the developer is controlling
190190 // attribute spreading manually. If :apply was set at the call site, all attributes are
191191 // forwarded explicitly via the merged $attributes array. Either way, skip auto-fallthrough.
192- $ skipFallthrough = str_contains ($ this ->viewComponent ->contents , ':apply= ' )
193- || $ this ->applyExpression !== null ;
192+ $ skipFallthrough = str_contains ($ this ->viewComponent ->contents , ':apply= ' ) || $ this ->applyExpression !== null ;
194193
195194 $ tokens = TempestViewParser::ast ($ this ->viewComponent ->contents );
196195
@@ -205,10 +204,8 @@ private function compileComponent(): ImmutableString
205204 // A valid fallthrough target is the first real HTML open or self-closing tag
206205 // that is not x-slot. SELF_CLOSING_TAG covers bare no-attribute forms like <div/>.
207206 // OPEN_TAG_START covers everything else, including <div class="foo" />.
208- $ shouldApplyFallthrough = ! $ fallthroughApplied
209- && ! $ skipFallthrough
210- && in_array ($ token ->type , [TokenType::OPEN_TAG_START , TokenType::SELF_CLOSING_TAG ], true )
211- && $ token ->tag !== 'x-slot ' ;
207+ $ shouldApplyFallthrough =
208+ ! $ fallthroughApplied && ! $ skipFallthrough && in_array ($ token ->type , [TokenType::OPEN_TAG_START , TokenType::SELF_CLOSING_TAG ], true ) && $ token ->tag !== 'x-slot ' ;
212209
213210 if (! $ shouldApplyFallthrough ) {
214211 $ buffer .= $ this ->compileTokens (tokens: [$ token ]);
@@ -464,4 +461,4 @@ public function getImports(): array
464461
465462 return $ imports ;
466463 }
467- }
464+ }
0 commit comments