sr-npm 1.7.1330 → 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.1330",
3
+ "version": "1.7.1332",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,9 +27,9 @@ function loadCategoryRepeaterData(_$w, allvaluesobjects) {
27
27
 
28
28
  async function bindPrimarySearch(_$w) {
29
29
  handleCategoryEvents(_$w);
30
- _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).onReady(async () => {
30
+
31
31
  await handleSearchInput(_$w);
32
- });
32
+
33
33
 
34
34
  // on mouse out collapse the results container
35
35
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).onMouseOut(async () => {
@@ -128,7 +128,19 @@ 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 = _$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
+ }
132
144
 
133
145
  if( count > 0 ) {
134
146
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).expand();
@@ -139,7 +151,18 @@ async function queryPrimarySearchResults(_$w, query) {
139
151
  await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).setFilter(filter);
140
152
  await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).refresh();
141
153
 
142
- 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
+ }
143
166
  if (count > 0) {
144
167
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).expand();
145
168
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_MULTI_BOX).changeState(PRIMARY_SEARCH_STATES.JOB_RESULTS);