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 +1 -1
- package/public/primarySearchUtils.js +12 -7
package/package.json
CHANGED
|
@@ -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==="
|
|
136
|
+
if(error.message==="Cannot read properties of undefined (reading 'total')")
|
|
137
137
|
{
|
|
138
|
-
count
|
|
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==="
|
|
160
|
+
if(error.message==="Cannot read properties of undefined (reading 'total')")
|
|
160
161
|
{
|
|
161
|
-
count
|
|
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);
|