sr-npm 1.7.1331 → 1.7.1333
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 +21 -4
package/package.json
CHANGED
|
@@ -127,10 +127,17 @@ async function queryPrimarySearchResults(_$w, query) {
|
|
|
127
127
|
|
|
128
128
|
await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).setFilter(filter);
|
|
129
129
|
await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).refresh();
|
|
130
|
-
|
|
131
|
-
await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).onReadyAsync();
|
|
132
130
|
|
|
133
|
-
let count
|
|
131
|
+
let count=0
|
|
132
|
+
try{
|
|
133
|
+
count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
if(error.message!="Cannot read properties of undefined (reading 'total')")
|
|
137
|
+
{
|
|
138
|
+
console.error('Failed to get total count:', error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
134
141
|
|
|
135
142
|
if( count > 0 ) {
|
|
136
143
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).expand();
|
|
@@ -141,7 +148,17 @@ async function queryPrimarySearchResults(_$w, query) {
|
|
|
141
148
|
await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).setFilter(filter);
|
|
142
149
|
await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).refresh();
|
|
143
150
|
|
|
144
|
-
|
|
151
|
+
|
|
152
|
+
try{
|
|
153
|
+
count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
if(error.message!=="Cannot read properties of undefined (reading 'total')")
|
|
157
|
+
{
|
|
158
|
+
console.error('Failed to get total count:', error);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
}
|
|
145
162
|
if (count > 0) {
|
|
146
163
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).expand();
|
|
147
164
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_MULTI_BOX).changeState(PRIMARY_SEARCH_STATES.JOB_RESULTS);
|