Skip to content

Commit

Permalink
handle perPage as a function parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
qhoxie committed Feb 2, 2015
1 parent 74ec1a0 commit 11818f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.swiftype.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
params['q'] = query;
params['engine_key'] = config.engineKey;
params['page'] = options.page;
params['per_page'] = config.perPage;

function handleFunctionParam(field) {
if (field !== undefined) {
Expand All @@ -108,6 +107,7 @@
return undefined;
}

params['per_page'] = handleFunctionParam(config.perPage);
params['search_fields'] = handleFunctionParam(config.searchFields);
params['fetch_fields'] = handleFunctionParam(config.fetchFields);
params['facets'] = handleFunctionParam(config.facets);
Expand Down

0 comments on commit 11818f1

Please sign in to comment.