Skip to content

Commit

Permalink
fix: skip absolutizing empty hrefs (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
toufic-m authored and adampash committed Apr 10, 2019
1 parent 73be0c5 commit 3614e31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/dom/make-links-absolute.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function absolutize($, rootUrl, attr) {
$(`[${attr}]`).each((_, node) => {
const attrs = getAttrs(node);
const url = attrs[attr];
if (!url) return;
const absoluteUrl = URL.resolve(baseUrl || rootUrl, url);

setAttr(node, attr, absoluteUrl);
Expand Down

0 comments on commit 3614e31

Please sign in to comment.