Skip to content

Commit

Permalink
Refactor MetaTags component to use null coalescing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilan-riviere committed Mar 15, 2024
1 parent d427e64 commit 6705550
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Components/MetaTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function render()
];
}

$this->title = $this->title ?? $this->props[$this->key]['title'];
$this->description = $this->description ?? $this->props[$this->key]['description'];
$this->image = $this->image ?? $this->props[$this->key]['image'];
$this->title = $this->props[$this->key]['title'] ?? $this->title;
$this->description = $this->props[$this->key]['description'] ?? $this->description;
$this->image = $this->props[$this->key]['image'] ?? $this->image;
$this->color = $this->props[$this->key]['color'] ?? $this->color;

if (! str_starts_with($this->color, '#')) {
Expand Down

0 comments on commit 6705550

Please sign in to comment.