Skip to content

Commit 076af21

Browse files
committed
read category id from url if present
1 parent f87f3ad commit 076af21

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

unbxdSearch.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//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
22
var unbxdSearchInit = function(jQuery, Handlebars){
33
window.Unbxd = window.Unbxd || {};
4-
Unbxd.jsSdkVersion = "1.0.3";
4+
Unbxd.jsSdkVersion = "1.0.4";
55

66
// Production steps of ECMA-262, Edition 5, 15.4.4.14
77
// Reference: http://es5.github.io/#x15.4.4.14
@@ -553,7 +553,8 @@ var unbxdSearchInit = function(jQuery, Handlebars){
553553

554554
this.params = finalParams;
555555

556-
this.params.categoryId = this.options.type == "browse" && typeof this.options.getCategoryId == "function" ? this.options.getCategoryId() : "";
556+
this.params.categoryId = this.options.type == "browse" && typeof this.options.getCategoryId == "function" ?
557+
this.options.getCategoryId() : (this.params.categoryId ? this.params.categoryId : "");
557558

558559
this.setPage("page" in finalParams.extra ? finalParams.extra.page : 1)
559560
.setPageSize("rows" in finalParams.extra ? finalParams.extra.rows : this.options.pageSize);

0 commit comments

Comments
 (0)