fix: skip absolutizing empty hrefs (#372)

pull/373/head
Toufic Mouallem 5 years ago committed by Adam Pash
parent 73be0c5a10
commit 3614e31abc

@ -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);

Loading…
Cancel
Save