sr-npm 1.7.629 → 1.7.630

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.629",
3
+ "version": "1.7.630",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -175,19 +175,18 @@ async function loadJobs(_$w) {
175
175
  };
176
176
 
177
177
  function updateOptionsUI($item, fieldId, searchQuery) {
178
- const base = optionsByFieldId.get(fieldId) || [];
178
+ let base = optionsByFieldId.get(fieldId) || [];
179
179
  const countsMap = countsByFieldId.get(fieldId) || new Map();
180
- let countsMapWithoutZero=new Map()
181
180
  for (const element of countsMap)
182
181
  {
183
- if (element[1]!=0)
182
+ if (element[1]===0)
184
183
  {
185
- countsMapWithoutZero.set(element[0],element[1])
184
+ base= base.filter(o => o.value !== element[0])
186
185
  }
187
186
  }
188
187
  // Build display options with counts
189
188
  const withCounts = base.map(o => {
190
- const count = countsMapWithoutZero.get(o.value)
189
+ const count = countsMap.get(o.value)
191
190
  return {
192
191
  label: `${o.label} (${count})`,
193
192
  value: o.value