From 46c1caced2ddcb773d15d76ca01e448a0cf700f9 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Thu, 25 Apr 2019 22:19:21 +0200 Subject: [PATCH] refactor: replace url parse and format with simple split --- lib/definitions/errors.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/definitions/errors.js b/lib/definitions/errors.js index 8ab120c..e9c9aca 100644 --- a/lib/definitions/errors.js +++ b/lib/definitions/errors.js @@ -1,7 +1,6 @@ -const url = require('url'); const pkg = require('../../package.json'); -const homepage = url.format({...url.parse(pkg.homepage), ...{hash: null}}); +const [homepage] = pkg.homepage.split('#'); const linkify = file => `${homepage}/blob/master/${file}`; module.exports = {