diff --git a/lib/errors.js b/lib/errors.js index 0efc923e..cf5ddba6 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -4,7 +4,7 @@ const url = require('url') function packageName (href) { try { - let basePath = new url.URL(href).pathname.substr(1) + let basePath = new url.URL(href).pathname.slice(1) if (!basePath.match(/^-/)) { basePath = basePath.split('/') var index = basePath.indexOf('_rewrite')