Skip to content

Commit 86d7c19

Browse files
committed
#1 - Fixed issue with >10 search results
1 parent 2acf874 commit 86d7c19

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/themes/default/assets/js/search.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@
126126

127127
// check we have a valid search and data to search through
128128
if (currentSearch && currentSearch.length >= MIN_CHARS && hasSearchData()) {
129-
l = (searchData.length < MAX_RESULTS) ? searchData.length : MAX_RESULTS;
129+
l = searchData.length;
130130

131-
for (; i < l; i++) {
131+
for (; (i < l && results.length < MAX_RESULTS); i++) {
132132
page = searchData[i];
133133
for (prop in page) {
134134
if (page.hasOwnProperty(prop)) {

src/themes/default/templates/partials/search-json.hbs

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ ext: 'json'
99
filter='{
1010
"!index": false
1111
}'
12+
page='{
13+
"length": 10000
14+
}'
1215
}}{
1316
"title": "{{ title }}"
1417
, "url": "{{ pathUrl }}"

0 commit comments

Comments
 (0)