Skip to content

Commit

Permalink
fix: allow remove base on urn uids
Browse files Browse the repository at this point in the history
Create root in the same way prependBase creates a URL
  • Loading branch information
Elodie Thiéblin committed Jul 23, 2021
1 parent 20e2286 commit a7183e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 += '//';
Expand Down

0 comments on commit a7183e9

Please sign in to comment.