We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7d645ea + 3dfc88b commit 5ccd4b2Copy full SHA for 5ccd4b2
FrontEnd/scripts/debug_panel.js
@@ -76,11 +76,11 @@ export class SPIDebugPanel extends HTMLElement {
76
}
77
78
addCanonicalUrls() {
79
- const canonicalUrl = document.querySelector('link[rel="canonical"]').href
+ const canonicalUrl = document.querySelector('link[rel="canonical"]')?.href
80
const windowUrl = window.location.href
81
const matchingCanonicalUrl = canonicalUrl === windowUrl
82
83
- this.newTableRow('Canonical URL', canonicalUrl)
+ this.newTableRow('Canonical URL', canonicalUrl ? canonicalUrl : 'Missing', canonicalUrl ? null : 'red')
84
this.newTableRow('Window URL', windowUrl)
85
this.newTableRow('Canonical Match', matchingCanonicalUrl, matchingCanonicalUrl ? 'green' : 'red')
86
0 commit comments