fix const error
This commit is contained in:
parent
6740f76d17
commit
6a126115bc
|
@ -3,7 +3,7 @@ const url = require('url');
|
||||||
const packageURLFormat = /^\/((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(\/.*)?$/;
|
const packageURLFormat = /^\/((?:@[^/@]+\/)?[^/@]+)(?:@([^/]+))?(\/.*)?$/;
|
||||||
|
|
||||||
function parsePackageURL(originalURL) {
|
function parsePackageURL(originalURL) {
|
||||||
const { pathname, search, query } = url.parse(originalURL, true);
|
let { pathname, search, query } = url.parse(originalURL, true);
|
||||||
try {
|
try {
|
||||||
pathname = decodeURIComponent(pathname);
|
pathname = decodeURIComponent(pathname);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue