From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/hosted-git-info/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'node_modules/hosted-git-info/index.js') diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js index 9055ab185..c1c2cc899 100644 --- a/node_modules/hosted-git-info/index.js +++ b/node_modules/hosted-git-info/index.js @@ -26,6 +26,7 @@ var authProtocols = { var cache = {} module.exports.fromUrl = function (giturl, opts) { + if (typeof giturl !== 'string') return var key = giturl + JSON.stringify(opts || {}) if (!(key in cache)) { @@ -58,7 +59,7 @@ function fromUrl (giturl, opts) { project = decodeURIComponent(shortcutMatch[3]) defaultRepresentation = 'shortcut' } else { - if (parsed.host !== gitHostInfo.domain) return + if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return if (!gitHostInfo.protocols_re.test(parsed.protocol)) return if (!parsed.path) return var pathmatch = gitHostInfo.pathmatch -- cgit v1.2.3