sr-npm 1.7.1203 → 1.7.1204

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.1203",
3
+ "version": "1.7.1204",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -458,16 +458,15 @@ function getValueFromValueId(valueIds, value) {
458
458
 
459
459
  function updateOptionsUI(_$w,fieldTitle, fieldId, searchQuery,clearAll=false) {
460
460
  let base = optionsByFieldId.get(fieldId) || [];
461
- let countsMap;
461
+ let countsMap=countsByFieldId.get(fieldId) || new Map();
462
462
  //const countsMap = countsByFieldId.get(fieldId) || new Map();
463
463
  if(considerAllJobs)
464
464
  {
465
465
  const selectedFieldId=Array.from( selectedByField.keys() )[0]
466
- const relevantFields=allvaluesobjects.filter(val=>val.customField===selectedFieldId)
467
- countsMap = new Map(relevantFields.map(val=>[val.valueId, val.count]));
468
- }
469
- else{
470
- countsMap = countsByFieldId.get(fieldId) || new Map();
466
+ if(selectedFieldId===fieldId) {
467
+ const relevantFields=allvaluesobjects.filter(val=>val.customField===selectedFieldId)
468
+ countsMap = new Map(relevantFields.map(val=>[val.valueId, val.count]));
469
+ }
471
470
  }
472
471
  if(dontUpdateThisCheckBox===fieldId && !clearAll && selectedByField.has(fieldId) )
473
472
  {