sr-npm 1.7.1332 → 1.7.1334

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.1332",
3
+ "version": "1.7.1334",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -128,16 +128,17 @@ async function queryPrimarySearchResults(_$w, query) {
128
128
  await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).setFilter(filter);
129
129
  await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).refresh();
130
130
 
131
- let count;
131
+ let count=0
132
132
  try{
133
133
  count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
134
134
  }
135
135
  catch (error) {
136
- if(error.message==="TypeError: Cannot read properties of undefined (reading 'total')")
136
+ if(error.message==="Cannot read properties of undefined (reading 'total')")
137
137
  {
138
- count = 0;
138
+ console.warn('failed to get total count due to known error, using 0')
139
+
139
140
  }
140
- else {
141
+ else{
141
142
  console.error('Failed to get total count:', error);
142
143
  }
143
144
  }
@@ -156,13 +157,17 @@ catch (error) {
156
157
  count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
157
158
  }
158
159
  catch (error) {
159
- if(error.message==="TypeError: Cannot read properties of undefined (reading 'total')")
160
+ if(error.message==="Cannot read properties of undefined (reading 'total')")
160
161
  {
161
- count = 0;
162
+ console.warn('failed to get total count due to known error, using 0')
163
+
162
164
  }
163
- else {
165
+ else
166
+ {
164
167
  console.error('Failed to get total count:', error);
165
168
  }
169
+
170
+ }
166
171
  if (count > 0) {
167
172
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).expand();
168
173
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_MULTI_BOX).changeState(PRIMARY_SEARCH_STATES.JOB_RESULTS);