From 6705550c12cbc85f4c12398ebd90014298b3f452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Fri, 15 Mar 2024 14:38:03 +0100 Subject: [PATCH] Refactor MetaTags component to use null coalescing operator --- src/Components/MetaTags.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Components/MetaTags.php b/src/Components/MetaTags.php index a17f9e8..e584753 100644 --- a/src/Components/MetaTags.php +++ b/src/Components/MetaTags.php @@ -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, '#')) {