@salesforcedevs/docs-components 1.2.20-alpha → 1.2.22-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
|
@@ -616,15 +616,9 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
dropVersionFromDocId(docId: string): string {
|
|
619
|
-
const
|
|
620
|
-
const filteredDocId =
|
|
621
|
-
|
|
622
|
-
if (versionRegex.test(docIdElement)) {
|
|
623
|
-
return "";
|
|
624
|
-
}
|
|
625
|
-
return docIdElement;
|
|
626
|
-
});
|
|
627
|
-
return filteredDocId.join(".");
|
|
619
|
+
const curVersion = this.version.id + ".";
|
|
620
|
+
const filteredDocId = docId.replace(curVersion, "");
|
|
621
|
+
return filteredDocId;
|
|
628
622
|
}
|
|
629
623
|
|
|
630
624
|
addMetatags(): void {
|
|
@@ -658,15 +652,16 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
658
652
|
'link[rel="canonical"]'
|
|
659
653
|
);
|
|
660
654
|
if (metadescription) {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
655
|
+
const copyPageReference = { ...this.pageReference };
|
|
656
|
+
copyPageReference.docId = copyPageReference.docId
|
|
657
|
+
? this.dropVersionFromDocId(copyPageReference.docId)
|
|
658
|
+
: copyPageReference.docId;
|
|
664
659
|
metadescription.setAttribute(
|
|
665
660
|
"href",
|
|
666
661
|
window.location.protocol +
|
|
667
662
|
"//" +
|
|
668
663
|
window.location.host +
|
|
669
|
-
this.pageReferenceToString(
|
|
664
|
+
this.pageReferenceToString(copyPageReference)
|
|
670
665
|
);
|
|
671
666
|
}
|
|
672
667
|
}
|