Skip to content

Commit

Permalink
Fix vendored files not adding digest
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysm committed Feb 2, 2024
1 parent 6aaf7b5 commit 139b788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AssetResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AssetResolver
{
public function __invoke(string $fileRelativePath)
{
if (str_starts_with($fileRelativePath, 'vendor/') && File::exists($absolutePath = public_path($fileRelativePath))) {
if (str_starts_with(trim($fileRelativePath, '/'), 'vendor/') && File::exists($absolutePath = public_path($fileRelativePath))) {
return asset($fileRelativePath).'?digest='.(new FileDigest())($absolutePath);
}

Expand Down

0 comments on commit 139b788

Please sign in to comment.