diff --git a/lib/rel.js b/lib/rel.js index 0ca10dc..3ee6a3e 100644 --- a/lib/rel.js +++ b/lib/rel.js @@ -7,7 +7,8 @@ function relSitemapInject(data) { if (!rel || data.match(/rel=['|"]?sitemap['|"]?/i)) return; - const relSitemap = ``; + const relPath = typeof path === 'string' ? path : path[0]; + const relSitemap = ``; return data.replace(/(?!<\/head>).+?<\/head>/s, str => str.replace('', `${relSitemap}`)); }