Skip to content

Commit

Permalink
Update lib/npa.js
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Harband <ljharb@gmail.com>
  • Loading branch information
bdehamer and ljharb authored Nov 29, 2022
1 parent 4b11e8a commit 3a49abb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/npa.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function toPurl (arg, reg = defaultRegistry) {

// URI-encode leading @ of scoped packages
let purl = 'pkg:npm/' + res.name.replace(/^@/, '%40') + '@' + res.rawSpec
if (reg) {
if (reg !== defaultRegistry) {
purl += '?repository_url=' + reg
}

Expand Down

0 comments on commit 3a49abb

Please sign in to comment.