sr-npm 1.7.632 → 1.7.634

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.632",
3
+ "version": "1.7.634",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -178,16 +178,22 @@ async function loadJobs(_$w) {
178
178
  let base = optionsByFieldId.get(fieldId) || [];
179
179
  const countsMap = countsByFieldId.get(fieldId) || new Map();
180
180
  console.log("base before filtering: ",base)
181
- for (const element of countsMap)
181
+ console.log("countsMap: ",countsMap)
182
+ let filteredbase=[]
183
+
184
+
185
+
186
+ for (const element of base)
182
187
  {
183
- if (element[1]===0)
188
+ console.log("element: ",element)
189
+ if(countsMap.get(element.value))
184
190
  {
185
- base= base.filter(o => o.value !== element[0])
191
+ filteredbase.push(element)
186
192
  }
187
193
  }
188
- console.log("base after filtering: ",base)
194
+ console.log("base after filtering: ",filteredbase)
189
195
  // Build display options with counts
190
- const withCounts = base.map(o => {
196
+ const withCounts = filteredbase.map(o => {
191
197
  const count = countsMap.get(o.value)
192
198
  return {
193
199
  label: `${o.label} (${count})`,
@@ -209,7 +215,7 @@ async function loadJobs(_$w) {
209
215
 
210
216
  $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).options = filtered;
211
217
  $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).value = preserved;
212
-
218
+
213
219
  }
214
220
 
215
221
  async function applyJobFilters(_$w,filterByField) {