Skip to content

Commit

Permalink
🩹 Fix null value deprecation error for Str::endsWith (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColomb authored Jul 28, 2024
1 parent 510f911 commit 257b533
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SageSvg.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected function asset(string $image): ?string
foreach ($this->manifests as $key => $value) {
$bundle = $value['bundles'] ?? null;

if (Str::endsWith($bundle, 'build/manifest.json')) {
if ($bundle && Str::endsWith($bundle, 'build/manifest.json')) {
try {
return Vite::content(Str::of($image)->ltrim('/')->start('resources/')->__toString());
} catch (Throwable) {
Expand Down

0 comments on commit 257b533

Please sign in to comment.