Browse Source

validity check

pull/7/head
Peter Johnson 10 years ago
parent
commit
d6ae185cc1
  1. 2
      controller/search.js

2
controller/search.js

@ -21,7 +21,7 @@ function setup( backend, query ){
// handle backend errors
if( err ){ return next( err ); }
if( data && data.hits && data.hits.total){
if( data && data.hits && data.hits.total && Array.isArray(data.hits.hits)){
docs = data.hits.hits.map( function( hit ){
return hit._source;
});

Loading…
Cancel
Save