@salesforcedevs/dx-components 0.18.2 → 0.18.3
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.
|
@@ -282,25 +282,19 @@ export default class SidebarSearch extends LightningElement {
|
|
|
282
282
|
uniqueId
|
|
283
283
|
}: Result): SidebarSearchResult => {
|
|
284
284
|
// discussion about this normalization here: https://salesforce-internal.slack.com/archives/C020S6784JX/p1639506238376600
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
285
|
+
let pathname;
|
|
286
|
+
if (sfhtml_url__c) {
|
|
287
|
+
pathname = `/docs/${sfhtml_url__c}`;
|
|
288
|
+
} else {
|
|
289
|
+
const extension =
|
|
290
|
+
clickUri.endsWith("/overview") ||
|
|
291
|
+
clickUri.endsWith("/references")
|
|
292
|
+
? ""
|
|
293
|
+
: ".html";
|
|
294
|
+
const url = new URL(clickUri);
|
|
295
|
+
pathname = `${url.pathname}${extension}`;
|
|
290
296
|
}
|
|
291
297
|
|
|
292
|
-
const isOverview =
|
|
293
|
-
endPathInUri === "overview" ||
|
|
294
|
-
this.coveoAdvancedQueryConfig.path_segment_3 === endPathInUri;
|
|
295
|
-
|
|
296
|
-
const extension =
|
|
297
|
-
this.coveoAdvancedQueryConfig.path_segment_4 === "references" ||
|
|
298
|
-
isOverview
|
|
299
|
-
? ""
|
|
300
|
-
: ".html";
|
|
301
|
-
const pathname = sfhtml_url__c
|
|
302
|
-
? `/docs/${sfhtml_url__c}`
|
|
303
|
-
: `${new URL(clickUri).pathname}${extension}`;
|
|
304
298
|
const href = `${pathname}?q=${this.value}`;
|
|
305
299
|
|
|
306
300
|
return {
|