Skip to content

Commit 4e47c80

Browse files
committed
fix(view): handle icon name parsing without colon
1 parent 17eeebc commit 4e47c80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/view/src/Components/Icon.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ private function download(string $prefix, string $name): ?string
7575
private function svg(string $name): ?string
7676
{
7777
try {
78-
$parts = explode(':', Str\replace($name, '-', ':'), 2);
78+
if (! Str\contains($name, ':')) {
79+
$name = Str\replace_first($name, '-', ':');
80+
}
81+
82+
$parts = explode(':', $name, limit: 2);
7983

8084
if (count($parts) !== 2) {
8185
return null;

0 commit comments

Comments
 (0)