sr-npm 1.7.147 → 1.7.149

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.147",
3
+ "version": "1.7.149",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -224,7 +224,6 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
224
224
  });
225
225
 
226
226
  const filter = await getFilter(filters, 'and');
227
-
228
227
  await _$w('#jobsDataset').setFilter(filter);
229
228
  await _$w('#jobsDataset').refresh();
230
229
 
@@ -268,6 +267,11 @@ async function handleDepartmentParam(_$w,department) {
268
267
  console.log("after refresh");
269
268
  const dropdownOptions = _$w('#dropdownDepartment').options;
270
269
  console.log("dropdown options:", dropdownOptions);
270
+ const optionsFromCMS=await wixData.query("AmountOfJobsPerDepartment").find();
271
+ if(dropdownOptions.length!==optionsFromCMS.items.length){
272
+ throw new Error("dropdownOptions.length!==optionsFromCMS.items.length");
273
+ }
274
+
271
275
 
272
276
  // Try setting the value
273
277
  _$w('#dropdownDepartment').value = departmentValue;