diff --git a/lib/url.js b/lib/url.js index 7855f693..eab920f7 100644 --- a/lib/url.js +++ b/lib/url.js @@ -165,7 +165,10 @@ api.removeBase = (base, iri) => { // establish base root let root = ''; if(base.href !== '') { - root += (base.protocol || '') + '//' + (base.authority || ''); + root += base.protocol || ''; + if(base.authority !== null) { + root += '//' + base.authority; + } } else if(iri.indexOf('//')) { // support network-path reference with empty base root += '//';