Skip to content

Commit 85852b0

Browse files
authored
$iconPath can be null and empty. (#897)
1 parent 7216536 commit 85852b0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Icon/Service/IconService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ public function getIconForTag(): string
111111
public function getIconForClassDefinition(?string $iconPath): ElementIcon
112112
{
113113
$type = ElementIconTypes::PATH->value;
114-
if ($iconPath === null) {
114+
// $iconPath can be null and empty string
115+
if (empty($iconPath)) {
115116
$type = ElementIconTypes::NAME->value;
116117
$iconPath = 'class';
117118
}

0 commit comments

Comments
 (0)