Skip to content

Commit

Permalink
handle exception when SVGParser::fromString called
Browse files Browse the repository at this point in the history
  • Loading branch information
priyashantha committed Mar 4, 2024
1 parent 95eebca commit 12efe10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Assets/Svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public function __construct($record = null, $isSingleton = false, array $queryPa
parent::__construct($record, $isSingleton, $queryParams);

if ($this->File->exists()) {
$this->svg = SVGParser::fromString($this->File->getString());
try {
$this->svg = SVGParser::fromString($this->File->getString());
} catch (\Exception $e) {}
}
}

Expand Down

0 comments on commit 12efe10

Please sign in to comment.