Skip to content

Commit

Permalink
trim() versions.txt before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 22, 2024
1 parent dd27d24 commit 32a0540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useInventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const get = async (rq: PackageRequirement | Package) => {
}

const releases = await rsp.text()
let versions = releases ? releases.split("\n").compact(x => new SemVer(x)) : []
let versions = releases.trim().split("\n").map(x => new SemVer(x))

if (versions.length < 1) throw new Error(`No versions for ${rq.project}`)

Expand Down

0 comments on commit 32a0540

Please sign in to comment.