Skip to content

Commit

Permalink
Simplify counting slots
Browse files Browse the repository at this point in the history
Co-authored-by: Ahmet Bora <[email protected]>
  • Loading branch information
bastianallgeier and afbora authored Jan 17, 2023
1 parent bfde458 commit ff90e6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Template/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function render(array $data = []): string

// no slots have been defined, but the template code
// should be used as default slot
if (count(Snippet::$current->slots()) === 0) {
if (Snippet::$current->slots()->count() === 0) {
return Snippet::$current->render($data, [
'default' => $template
]);
Expand Down

0 comments on commit ff90e6c

Please sign in to comment.