Skip to content

Commit 1d30c54

Browse files
committed
Render max 8 hits
1 parent 35a1785 commit 1d30c54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

static/shared/js/documentation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ $(function() {
217217
return;
218218
}
219219

220-
// Render results
221-
for (var i = 0; i < searchHits.length; i++) {
220+
// Render results (max 8)
221+
for (var i = 0; i < Math.min(searchHits.length, 8); i++) {
222222
var page = searchHits[i];
223223

224224
$('<li class="result"><a href="' + page.url + '"><em>' + page.title + '</em><small>' + page.section + '</small></a></li>').appendTo("#search-results");

0 commit comments

Comments
 (0)