Skip to content

Commit 202653c

Browse files
committed
🎨 Ensure colors is an array
1 parent 4c313b0 commit 202653c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Concerns/Palette.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public function palette($color = null)
4444
]);
4545
}
4646

47-
return ! empty($color) && is_string($color) ? (
48-
$colors[$color] ?? null
47+
return ! empty($color) && is_string($color) && is_array($colors) ? (
48+
array_key_exists($color, $colors) ? $colors[$color] : null
4949
) : $colors;
5050
}
5151
}

0 commit comments

Comments
 (0)