mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Adapt per review
This commit is contained in:
parent
c696386825
commit
06ef0c3990
1 changed files with 1 additions and 6 deletions
|
|
@ -30,11 +30,7 @@ export function parsePipMetadataUrl(url) {
|
|||
}
|
||||
|
||||
const pathSegments = urlObj.pathname.split("/").filter(Boolean);
|
||||
if (
|
||||
pathSegments.length >= 2 &&
|
||||
pathSegments[0] === "simple" &&
|
||||
pathSegments[1]
|
||||
) {
|
||||
if (pathSegments[0] === "simple" && pathSegments[1]) {
|
||||
return {
|
||||
packageName: decodeURIComponent(pathSegments[1]),
|
||||
type: "simple",
|
||||
|
|
@ -42,7 +38,6 @@ export function parsePipMetadataUrl(url) {
|
|||
}
|
||||
|
||||
if (
|
||||
pathSegments.length >= 3 &&
|
||||
pathSegments[0] === "pypi" &&
|
||||
pathSegments[pathSegments.length - 1] === "json" &&
|
||||
pathSegments[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue