Skip to content

Commit f5f30a1

Browse files
committed
fix issue where icondir does not yet exist
1 parent f327a5f commit f5f30a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Icons/src/Registry/LocalSvgIconRegistry.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ public function add(string $name, string $svg): void
8585

8686
public function getIterator(): \Traversable
8787
{
88+
if (!is_dir($this->iconDir)) {
89+
return new \EmptyIterator();
90+
}
91+
8892
foreach ($this->finder()->sortByName() as $file) {
8993
yield str_replace(['.svg', '/'], ['', ':'], $file->getRelativePathname());
9094
}

0 commit comments

Comments
 (0)