@salesforcedevs/dx-components 0.18.3 → 0.18.4

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/dx-components",
3
- "version": "0.18.3",
3
+ "version": "0.18.4",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -29,5 +29,5 @@
29
29
  "@types/debounce": "^1.2.0",
30
30
  "@types/lodash.get": "^4.4.6"
31
31
  },
32
- "gitHead": "52ca593aa106591201218495916da5169e0e9470"
32
+ "gitHead": "070ef3fc124d8120431027c36bc88faa81bd6df2"
33
33
  }
@@ -282,20 +282,22 @@ 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
+ const isOverview = clickUri.endsWith("/overview");
287
+ const isReferenceOrOverview =
288
+ isOverview || clickUri.endsWith("/references");
289
+
290
+ const query = isOverview ? "" : `?q=${this.value}`;
285
291
  let pathname;
286
292
  if (sfhtml_url__c) {
287
293
  pathname = `/docs/${sfhtml_url__c}`;
288
294
  } else {
289
- const extension =
290
- clickUri.endsWith("/overview") ||
291
- clickUri.endsWith("/references")
292
- ? ""
293
- : ".html";
294
295
  const url = new URL(clickUri);
296
+ const extension = isReferenceOrOverview ? "" : ".html";
295
297
  pathname = `${url.pathname}${extension}`;
296
298
  }
297
299
 
298
- const href = `${pathname}?q=${this.value}`;
300
+ const href = `${pathname}${query}`;
299
301
 
300
302
  return {
301
303
  title,