Skip to content

Commit

Permalink
feat(search): wrap result into object when original result is an array
Browse files Browse the repository at this point in the history
Closes #263
  • Loading branch information
lubber-de authored and Sean committed Nov 28, 2018
1 parent 3df1d57 commit f25f32e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/definitions/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,11 @@ $.fn.search = function(parameters) {

parse: {
response: function(response, searchTerm) {
if(Array.isArray(response)){
var o={};
o[fields.results]=response;
response = o;
}
var
searchHTML = module.generateResults(response)
;
Expand Down

0 comments on commit f25f32e

Please sign in to comment.