@salesforcedevs/docs-components 1.2.19-alpha → 1.2.20-alpha

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.2.19-alpha",
3
+ "version": "1.2.20-alpha",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -618,10 +618,11 @@ export default class DocXmlContent extends LightningElementWithState<{
618
618
  dropVersionFromDocId(docId: string): string {
619
619
  const docIdElemets = docId.split(".");
620
620
  const filteredDocId = docIdElemets.filter((docIdElement) => {
621
- if (docIdElement.match(/^[0-9]+$/) === null) {
622
- return docIdElement;
621
+ const versionRegex = /^[0-9]+$/;
622
+ if (versionRegex.test(docIdElement)) {
623
+ return "";
623
624
  }
624
- return "";
625
+ return docIdElement;
625
626
  });
626
627
  return filteredDocId.join(".");
627
628
  }