sr-npm 1.7.1333 → 1.7.1335

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.
@@ -1,5 +1,6 @@
1
1
  const CAREERS_MULTI_BOXES_PAGE_CONSTS={
2
2
  JOBS_DATASET: '#jobsDataset',
3
+ JOB_REPEATER_Dataset: '#jobReapterDataset',
3
4
  FILTER_REPEATER: '#filterReapter',
4
5
  JOBS_REPEATER: '#jobsReapter',
5
6
  JOBS_REPEATER_ITEM_TITLE: '#jobTitle',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.1333",
3
+ "version": "1.7.1335",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -10,7 +10,7 @@ async function handlePrimarySearch(_$w, allvaluesobjects) {
10
10
  loadCategoryRepeaterData(_$w, allvaluesobjects);
11
11
 
12
12
  // wait for the jobs dataset to be ready
13
- await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).onReadyAsync();
13
+ await _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).onReadyAsync();
14
14
 
15
15
  await bindPrimarySearch(_$w);
16
16
  }
@@ -125,16 +125,20 @@ async function queryPrimarySearchResults(_$w, query) {
125
125
 
126
126
  let filter = await getFilter(searchByTitle);
127
127
 
128
- await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).setFilter(filter);
129
- await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).refresh();
128
+ await _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).setFilter(filter);
129
+ await _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).refresh();
130
130
 
131
131
  let count=0
132
132
  try{
133
- count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
133
+ count = _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).getTotalCount();
134
134
  }
135
135
  catch (error) {
136
- if(error.message!="Cannot read properties of undefined (reading 'total')")
136
+ if(error.message==="Cannot read properties of undefined (reading 'total')")
137
137
  {
138
+ console.warn('failed to get total count due to known error, using 0')
139
+
140
+ }
141
+ else{
138
142
  console.error('Failed to get total count:', error);
139
143
  }
140
144
  }
@@ -145,15 +149,20 @@ catch (error) {
145
149
  }
146
150
  else {
147
151
  filter = await getFilter(searchByCity);
148
- await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).setFilter(filter);
149
- await _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).refresh();
152
+ await _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).setFilter(filter);
153
+ await _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).refresh();
150
154
 
151
155
 
152
156
  try{
153
- count = _$w(GLOBAL_SECTIONS_SELECTORS.JOBS_DATASET).getTotalCount();
157
+ count = _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).getTotalCount();
154
158
  }
155
159
  catch (error) {
156
- if(error.message!=="Cannot read properties of undefined (reading 'total')")
160
+ if(error.message==="Cannot read properties of undefined (reading 'total')")
161
+ {
162
+ console.warn('failed to get total count due to known error, using 0')
163
+
164
+ }
165
+ else
157
166
  {
158
167
  console.error('Failed to get total count:', error);
159
168
  }
@@ -39,6 +39,7 @@ const CAREERS_PAGE_SELECTORS = {
39
39
 
40
40
  const GLOBAL_SECTIONS_SELECTORS = {
41
41
  JOBS_DATASET: '#jobsDataset',
42
+ PRIMARY_JOBS_REPEATER_Dataset: '#jobReapterDataset',
42
43
 
43
44
  }
44
45