Skip to content

Commit

Permalink
Fix Blade component falsy slots (laravel#38546)
Browse files Browse the repository at this point in the history
* fix

* fix tests
  • Loading branch information
danharrin authored and victorvilella committed Oct 12, 2021
1 parent 021ce84 commit af7f8a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/View/Concerns/ManagesComponents.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function componentData()
*/
public function slot($name, $content = null, $attributes = [])
{
if ($content) {
if (func_num_args() === 2 || $content !== null) {
$this->slots[$this->currentComponent()][$name] = $content;
} elseif (ob_start()) {
$this->slots[$this->currentComponent()][$name] = '';
Expand Down

0 comments on commit af7f8a1

Please sign in to comment.