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.
package/package.json
CHANGED
|
@@ -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.
|
|
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.
|
|
129
|
-
await _$w(GLOBAL_SECTIONS_SELECTORS.
|
|
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.
|
|
133
|
+
count = _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_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
|
+
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.
|
|
149
|
-
await _$w(GLOBAL_SECTIONS_SELECTORS.
|
|
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.
|
|
157
|
+
count = _$w(GLOBAL_SECTIONS_SELECTORS.PRIMARY_JOBS_REPEATER_Dataset).getTotalCount();
|
|
154
158
|
}
|
|
155
159
|
catch (error) {
|
|
156
|
-
if(error.message
|
|
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
|
}
|