@salesforcedevs/docs-components 1.3.55-seo-test3 → 1.3.55-seo-test4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.55-seo-test3",
3
+ "version": "1.3.55-seo-test4",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -676,14 +676,16 @@ export default class DocXmlContent extends LightningElementWithState<{
676
676
  }
677
677
  }
678
678
 
679
+ // eslint-disable-next-line @lwc/lwc/no-document-query
679
680
  const headTag = document.getElementsByTagName("head");
680
681
  // this checks if the selected version is not the latest version,
681
- // then it adds the noindex, follow meta tag to the page
682
+ // then it adds the noindex, follow meta tag to the non-latest version pages.
683
+ // assumption is that first version in the availableVersions array is the latest.
682
684
  if (
683
685
  headTag.length &&
684
686
  this.version &&
685
687
  this.availableVersions.length &&
686
- this.version.id === this.availableVersions[0].id
688
+ this.version.id !== this.availableVersions[0].id
687
689
  ) {
688
690
  const robotsNoFollowMeta = document.createElement("meta");
689
691
  robotsNoFollowMeta.setAttribute("name", "robots");