Skip to content

Commit 43ba9f0

Browse files
committed
removing duplicated part from if
1 parent d5ffad3 commit 43ba9f0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Symfony/Component/AssetMapper/ImportMap/ImportMapManager.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,16 @@ public function getRawImportMapData(): array
172172
if (!$asset) {
173173
throw new \InvalidArgumentException(sprintf('The asset "%s" cannot be found in any asset map paths.', $entry->path));
174174
}
175-
176-
$path = $asset->publicPath;
177175
} else {
178176
$sourcePath = $this->packageDownloader->getDownloadedPath($entry->importName);
179177
$asset = $this->assetMapper->getAssetFromSourcePath($sourcePath);
180178

181179
if (!$asset) {
182180
throw new \InvalidArgumentException(sprintf('The "%s" vendor asset is missing. Run "php bin/console importmap:install".', $entry->importName));
183181
}
184-
$path = $asset->publicPath;
185182
}
186183

184+
$path = $asset->publicPath;
187185
$data = ['path' => $path, 'type' => $entry->type->value];
188186
$rawImportMapData[$entry->importName] = $data;
189187
}

0 commit comments

Comments
 (0)