Skip to content

Commit 99107a8

Browse files
committed
Simplify loop in search page
See #40
1 parent 0a05f10 commit 99107a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

search.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,7 @@ <h3 style='margin-top:0px'>Document structure:</h3>
217217
console.log(JSON.stringify(result));
218218
$("#result").html(`<br/>Hits: ${result.hits.total} <hr/>`);
219219
var hits = result.hits.hits;
220-
for (i in hits) {
221-
var hit = hits[i];
220+
for (let hit of hits) {
222221
var link = `<a href='http://localhost:9200/loc/work/${hit._id}/_source'>${hit._source.label}</a>`;
223222
$("#result").append(link + '<hr/>');
224223
}

0 commit comments

Comments
 (0)