@salesforcedevs/docs-components 1.34.5 → 1.34.6

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.34.5",
3
+ "version": "1.34.6",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -25,5 +25,5 @@
25
25
  "@types/lodash.orderby": "4.6.9",
26
26
  "@types/lodash.uniqby": "4.7.9"
27
27
  },
28
- "gitHead": "1df35017c1cc93551081329c96a37f42ed0780af"
28
+ "gitHead": "fbb4c02118f970fa5be88e91ea5a5023da9b8576"
29
29
  }
@@ -130,9 +130,16 @@ export default class DocXmlContent extends LightningElementWithState<{
130
130
  private get oldVersionInfo(): DocPhaseInfo | null {
131
131
  let info = null;
132
132
  if (!this.disableVersion) {
133
- const currentGAVersion = this.versionOptions.find(
134
- (version) => !version.url.includes(version.id)
135
- );
133
+ /**
134
+ * The GA version of en-us content has no version id in its url.
135
+ * Localized content can lag behind en-us, so its latest version url
136
+ * does include the version id. In that case, the first version in the
137
+ * list is the latest one.
138
+ **/
139
+ const currentGAVersion =
140
+ this.versionOptions.find(
141
+ (version) => !version.url.includes(version.id)
142
+ ) ?? this.versionOptions[0];
136
143
  if (currentGAVersion?.link?.href && this.version?.id) {
137
144
  const versionNo = currentGAVersion.id;
138
145
  /**