sr-npm 1.7.124 → 1.7.126

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": "sr-npm",
3
- "version": "1.7.124",
3
+ "version": "1.7.126",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -18,8 +18,14 @@ async function homePageOnReady(_$w,thisObject) {
18
18
  $item('#teamButton').onClick(async ()=>{
19
19
  const currentUrl = await location.url();
20
20
  console.log("currentUrl@@@@@@@@", currentUrl);
21
- const separator = currentUrl.includes('?') ? '&' : '?';
22
- location.to(`${currentUrl}${separator}department=${itemData._id}`);
21
+
22
+ // Get existing query params from current URL
23
+ const urlObj = new URL(currentUrl);
24
+ const existingParams = urlObj.search;
25
+
26
+ // Navigate to /positions with existing params + department
27
+ const separator = existingParams ? '&' : '?';
28
+ await location.to(`/positions${existingParams}${separator}department=${itemData._id}`);
23
29
  });
24
30
  });
25
31