Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 97c1bed

Browse files
committed
fabbot
1 parent 5e0c64f commit 97c1bed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/AssetMapper/ImportMap/Resolver/JsDelivrEsmResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ private function makeImportsBare(string $content, array &$dependencies): string
250250
// source maps are not also downloaded - so remove the sourceMappingURL
251251
$lastPos = strrpos($content, '//# sourceMappingURL');
252252
// remove the final one only (in case sourceMappingURL is used in the code)
253-
if ($lastPos !== false) {
254-
$content = substr($content, 0, $lastPos) . preg_replace('{//# sourceMappingURL=.*$}m', '', substr($content, $lastPos));
253+
if (false !== $lastPos) {
254+
$content = substr($content, 0, $lastPos).preg_replace('{//# sourceMappingURL=.*$}m', '', substr($content, $lastPos));
255255
}
256256

257257
return preg_replace('{/\*# sourceMappingURL=[^ ]*+ \*/}', '', $content);

0 commit comments

Comments
 (0)