Skip to content

Commit b382d34

Browse files
committed
Backward compatibility for those without view types
1 parent e5b5809 commit b382d34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unbxdSearch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
12051205
format : "json"
12061206
,page : 1
12071207
,rows : 12
1208-
,view : this.options.viewTypes[0]
1208+
,view : ( this.options.viewTypes !== undefined && this.options.viewTypes.length > 0 ? this.options.viewTypes[0] : "")
12091209
}
12101210
};
12111211

@@ -1300,7 +1300,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
13001300
params.extra.page = (parseInt(obj.start) / parseInt(params.extra.rows)) + 1;
13011301

13021302
if(!("view" in obj)) {
1303-
params.extra.view = this.options.viewTypes[0];
1303+
params.extra.view = ( this.options.viewTypes !== undefined && this.options.viewTypes.length > 0 ? this.options.viewTypes[0] : "");
13041304
} else {
13051305
params.extra.view = obj["view"];
13061306
}

0 commit comments

Comments
 (0)