fix const error

This commit is contained in:
William Hilton 2019-01-02 15:56:24 -05:00 committed by GitHub
parent 6740f76d17
commit 6a126115bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ const url = require('url');
const packageURLFormat = /^\/((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(\/.*)?$/;
function parsePackageURL(originalURL) {
const { pathname, search, query } = url.parse(originalURL, true);
let { pathname, search, query } = url.parse(originalURL, true);
try {
pathname = decodeURIComponent(pathname);
} catch (error) {