Skip to content

Commit

Permalink
Update SVGAvatar.php
Browse files Browse the repository at this point in the history
  • Loading branch information
RobiNN1 committed Aug 17, 2023
1 parent 519eead commit b751589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SVGAvatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private function initials(string $name): string {
* Generate avatar.
*/
private function generate(): string {
if (count($this->backgrounds) > 0) {
if ($this->backgrounds !== []) {
$background = Colors::getRandomColor($this->name, $this->backgrounds);
$text_color = $this->text_color === 'auto' ? Colors::getReadableColor($background) : $this->text_color;
} else {
Expand Down

0 comments on commit b751589

Please sign in to comment.