sr-npm 1.7.333 → 1.7.335

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.333",
3
+ "version": "1.7.335",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -180,16 +180,27 @@ function init(_$w) {
180
180
  _$w('#dropdownsContainer, #closeFiltersButton').collapse();
181
181
  });
182
182
 
183
- onChange(async (location1)=>{
184
- console.log("URL changed onChange ", location1);
185
- console.log("query.location: ", query.location);
186
- console.log("query.keyWord: ", query.keyWord);
187
- console.log("query.department: ", query.department);
188
- console.log("query.page: ", query.page);
189
- console.log("query ",query);
190
- console.log("testing n ew ");
191
- const my_test=await location.query();
192
- console.log("location.query(): ", my_test);
183
+ //URL onChange
184
+ onChange(async ()=>{
185
+
186
+ const newQueryParams=await location.query();
187
+ console.log("location.query(): ", newQueryParams);
188
+ if(newQueryParams.keyWord){
189
+ console.log("setting querykeypaaram")
190
+ queryKeyWordVar=newQueryParams.keyWord;
191
+ }
192
+ if(newQueryParams.department){
193
+ console.log("setting queryDepartmentVar")
194
+ queryDepartmentVar=newQueryParams.department;
195
+ }
196
+ if(newQueryParams.location){
197
+ console.log("setting queryLocationVar")
198
+ queryLocationVar=newQueryParams.location;
199
+ }
200
+ if(newQueryParams.page){
201
+ console.log("setting queryPageVar")
202
+ queryPageVar=newQueryParams.page;
203
+ }
193
204
  handleUrlParams(_$w);
194
205
  });
195
206