sr-npm 1.7.633 → 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.633",
3
+ "version": "1.7.634",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -179,17 +179,21 @@ async function loadJobs(_$w) {
179
179
  const countsMap = countsByFieldId.get(fieldId) || new Map();
180
180
  console.log("base before filtering: ",base)
181
181
  console.log("countsMap: ",countsMap)
182
- for (const element of countsMap)
182
+ let filteredbase=[]
183
+
184
+
185
+
186
+ for (const element of base)
183
187
  {
184
188
  console.log("element: ",element)
185
- if (element[1]===0)
189
+ if(countsMap.get(element.value))
186
190
  {
187
- base= base.filter(o => o.value !== element[0])
191
+ filteredbase.push(element)
188
192
  }
189
193
  }
190
- console.log("base after filtering: ",base)
194
+ console.log("base after filtering: ",filteredbase)
191
195
  // Build display options with counts
192
- const withCounts = base.map(o => {
196
+ const withCounts = filteredbase.map(o => {
193
197
  const count = countsMap.get(o.value)
194
198
  return {
195
199
  label: `${o.label} (${count})`,