sr-npm 1.7.1331 → 1.7.1332

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.1331",
3
+ "version": "1.7.1332",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -127,10 +127,20 @@ 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 = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
131
+ let count;
132
+ try{
133
+ count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
134
+ }
135
+ catch (error) {
136
+ if(error.message==="TypeError: Cannot read properties of undefined (reading 'total')")
137
+ {
138
+ count = 0;
139
+ }
140
+ else {
141
+ console.error('Failed to get total count:', error);
142
+ }
143
+ }
134
144
 
135
145
  if( count > 0 ) {
136
146
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).expand();
@@ -141,7 +151,18 @@ async function queryPrimarySearchResults(_$w, query) {
141
151
  await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).setFilter(filter);
142
152
  await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).refresh();
143
153
 
144
- count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
154
+
155
+ try{
156
+ count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
157
+ }
158
+ catch (error) {
159
+ if(error.message==="TypeError: Cannot read properties of undefined (reading 'total')")
160
+ {
161
+ count = 0;
162
+ }
163
+ else {
164
+ console.error('Failed to get total count:', error);
165
+ }
145
166
  if (count > 0) {
146
167
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).expand();
147
168
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_MULTI_BOX).changeState(PRIMARY_SEARCH_STATES.JOB_RESULTS);