diff --git a/extractOptionsFromScript.js b/extractOptionsFromScript.js index f97f3bc..9c025c9 100644 --- a/extractOptionsFromScript.js +++ b/extractOptionsFromScript.js @@ -185,7 +185,7 @@ function extractOptionsFromScript(window, optsArgs = { } if (translationMode == "subdomain") { - if (activeLang == originalLang) { + if (!activeLang || (activeLang == originalLang)) { newCanonicalLinkTag.href = `${window.location.protocol}//${domain}${window.location.pathname}`; } else { // Create a new URL object