diff --git a/lighthouse-core/audits/seo/hreflang.js b/lighthouse-core/audits/seo/hreflang.js index 3d49a3f0e280..a5b8781702f2 100644 --- a/lighthouse-core/audits/seo/hreflang.js +++ b/lighthouse-core/audits/seo/hreflang.js @@ -113,13 +113,17 @@ class Hreflang extends Audit { } if (link.source === 'head') { - source = { - type: 'node', - snippet: ``, - path: link.node !== null ? link.node.devtoolsNodePath : '', - selector: link.node !== null ? link.node.selector : '', - nodeLabel: link.node !== null ? link.node.nodeLabel : '', - }; + if (link.node) { + source = { + ...Audit.makeNodeItem(link.node), + snippet: ``, + }; + } else { + source = { + type: 'node', + snippet: ``, + }; + } } else if (link.source === 'headers') { source = `Link: <${link.hrefRaw}>; rel="alternate"; hreflang="${link.hreflang}"`; }