Skip to content

Commit

Permalink
[5.2] Web Asset Manager incorect loading of external resource with / …
Browse files Browse the repository at this point in the history
…at the end (#44774)
  • Loading branch information
Fedik authored Feb 2, 2025
1 parent 2f68102 commit 58b0f85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libraries/src/WebAsset/WebAssetItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +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 (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 58b0f85

Please sign in to comment.