Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedik committed Jan 24, 2025
1 parent aee4fe7 commit aef35a9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/src/WebAsset/WebAssetItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ public function getUri($resolvePath = true): string
break;
default:
// Asset for the ES modules may give us a folder for ESM import map
if ($this->getOption('importmap') && !$this->isPathExternal($path) &&
str_ends_with($path, '/') && !str_starts_with($path, '.')) {
if (
$this->getOption('importmap') && !$this->isPathExternal($path) &&
str_ends_with($path, '/') && !str_starts_with($path, '.')
) {
$path = Uri::root(true) . '/' . $path;
}
break;
Expand Down

0 comments on commit aef35a9

Please sign in to comment.