web/apps/hello-elasticsearch/js/hello-elasticsearch.js
function updateHits(response) {
  if(!response.hits.hasOwnProperty('hits') ||
     (response.hits.hits.length === 0)) {
    hide(hitsCard);
  }
  else {
    show(hitsCard);
    hitsBox.textContent = JSON.stringify(response.hits.hits, null, 2);
  }
}
function updateHits(response) {
  if(!response.hits.hasOwnProperty('hits') ||
     (response.hits.hits.length === 0)) {
    hide(hitsCard);
  }
  else {
    show(hitsCard);
    hitsBox.textContent = JSON.stringify(response.hits.hits, null, 2);
  }
}
function updateHits ( response ) { if ( ! response . hits . hasOwnProperty ( 'hits' ) || ( response . hits . hits . length === 0 ) ) { hide ( hitsCard ) ; } else { show ( hitsCard ) ; hitsBox . textContent = JSON . stringify ( response . hits . hits , null , 2 ) ; } }
Update the hits
Update the hits