Skip to content

Commit

Permalink
fix: trim leading slash when fetching entry from manifest (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksleight authored Jan 31, 2022
1 parent c317ad9 commit 50bc070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(string $path = null)
*/
public function getEntry(string $name): ManifestEntry
{
if (! $entry = $this->entries->first(fn (ManifestEntry $entry) => Str::contains($entry->src, $name))) {
if (! $entry = $this->entries->first(fn (ManifestEntry $entry) => Str::contains($entry->src, ltrim($name, '/')))) {
throw new NoSuchEntrypointException($name);
}

Expand Down

0 comments on commit 50bc070

Please # to comment.