@salesforcedevs/docs-components 1.3.55-seo-test1 → 1.3.55-seo-test2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -676,17 +676,18 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
-
const headTag = document.getElementsByTagName(
|
|
680
|
-
// this checks if the selected version is not the latest version,
|
|
679
|
+
const headTag = document.getElementsByTagName("head");
|
|
680
|
+
// this checks if the selected version is not the latest version,
|
|
681
681
|
// then it adds the noindex, follow meta tag to the page
|
|
682
|
-
if (
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
682
|
+
if (
|
|
683
|
+
headTag.length &&
|
|
684
|
+
this.version &&
|
|
685
|
+
this.availableVersions.length &&
|
|
686
|
+
this.version === this.availableVersions[0]
|
|
686
687
|
) {
|
|
687
|
-
const robotsNoFollowMeta = document.createElement(
|
|
688
|
+
const robotsNoFollowMeta = document.createElement("meta");
|
|
688
689
|
robotsNoFollowMeta.setAttribute("name", "robots");
|
|
689
|
-
robotsNoFollowMeta.setAttribute("content","noindex, follow");
|
|
690
|
+
robotsNoFollowMeta.setAttribute("content", "noindex, follow");
|
|
690
691
|
headTag[0].appendChild(robotsNoFollowMeta);
|
|
691
692
|
}
|
|
692
693
|
}
|