|
1 | 1 | //uglifyjs unbxdSearch.js -o unbxdSearch.min.js && gzip -c unbxdSearch.min.js > unbxdSearch.min.js.gz && aws s3 cp unbxdSearch.min.js.gz s3://unbxd/unbxdSearch.js --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-encoding gzip --cache-control max-age=3600
|
2 | 2 | var unbxdSearchInit = function(jQuery, Handlebars){
|
3 | 3 | window.Unbxd = window.Unbxd || {};
|
4 |
| - Unbxd.jsSdkVersion = "2.0.1"; |
| 4 | + Unbxd.jsSdkVersion = "2.0.2"; |
5 | 5 |
|
6 | 6 | // Production steps of ECMA-262, Edition 5, 15.4.4.14
|
7 | 7 | // Reference: http://es5.github.io/#x15.4.4.14
|
@@ -557,16 +557,16 @@ var unbxdSearchInit = function(jQuery, Handlebars){
|
557 | 557 | this.reset();
|
558 | 558 |
|
559 | 559 | var cur_url = this.getUrlSubstring()
|
560 |
| - ,urlqueryparams = this.getQueryParams(cur_url) |
561 |
| - // add test to check if the url is encoded, |
562 |
| - // decode the query parameters only if url is encoded |
563 |
| - // fixes SKU searches like writ0035/WRIT0035 & HSWD0015 |
564 |
| - ,decodedParams = !(/[^A-Za-z0-9\+\/\=]/g.test(cur_url)) ? this.getQueryParams(this.decode(cur_url)) : {} |
565 |
| - ,queryparamcount = Object.keys(urlqueryparams).length |
566 |
| - ,decodedParamscount = Object.keys(decodedParams).length |
567 |
| - ,finalParams = null; |
568 |
| - |
569 |
| - if(!this.options.noEncoding && decodedParamscount > 0){ |
| 560 | + , urlqueryparams = this.getQueryParams(cur_url) |
| 561 | + // add test to check if the url is encoded, |
| 562 | + // decode the query parameters only if url is encoded |
| 563 | + // fixes SKU searches like writ0035/WRIT0035 & HSWD0015 |
| 564 | + , decodedParams = !(this.options.noEncoding && /[^A-Za-z0-9\+\/\=]/g.test(cur_url)) ? this.getQueryParams(this.decode(cur_url)) : {} |
| 565 | + , queryparamcount = Object.keys(urlqueryparams).length |
| 566 | + , decodedParamscount = Object.keys(decodedParams).length |
| 567 | + , finalParams = null; |
| 568 | + |
| 569 | + if (!this.options.noEncoding && decodedParamscount > 0) { |
570 | 570 | finalParams = this._processURL(decodedParams);
|
571 | 571 | }else{
|
572 | 572 | finalParams = this._processURL(urlqueryparams);
|
|
0 commit comments