Skip to content

Commit 2e1f256

Browse files
author
ganapatib
committed
Fix build issues
1 parent 2cbfc00 commit 2e1f256

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

.idea/modules.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/vendor/page-search.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@
100100
const searchTerms = query.trim().split(/\s+/)
101101
const results = index.search(query.trim() + '*')
102102

103-
104103
return results.map((result) => {
105104
const doc = getDocFromResult(result)
106-
return {
105+
return {
107106
...doc,
108107
ref: result.ref,
109108
score: result.score,

src/js/vendor/search.bundle.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,10 @@
101101
const searchTerms = query.trim().split(/\s+/)
102102
const results = index.search(query.trim() + '*')
103103

104-
105-
106-
107104
return results.map((result) => {
108105
const doc = getDocFromResult(result)
109106

110-
return {
107+
return {
111108
...doc,
112109
ref: result.ref,
113110
score: result.score,
@@ -120,11 +117,10 @@
120117
const searchTerms = query.trim().split(/\s+/)
121118
const results = index.search(query.trim())
122119

123-
124120
return results.map((result) => {
125121
const doc = getDocFromResult(result)
126122

127-
return {
123+
return {
128124
...doc,
129125
ref: result.ref,
130126
score: result.score,
@@ -153,7 +149,7 @@
153149

154150
container.querySelector('ul').innerHTML = hits
155151
.map((hit) => {
156-
const titles = Array.isArray(hit.titles) ? hit.titles : []
152+
const titles = Array.isArray(hit.titles) ? hit.titles : []
157153
const searchTerms = Array.isArray(hit.searchTerms) ? hit.searchTerms : []
158154

159155
const rawParentTitle = hit.title || 'Untitled'
@@ -198,7 +194,7 @@
198194
const rawSnippet = buildSnippet(childRawText, searchTerms)
199195
const childText = highlightText(rawSnippet, searchTerms)
200196
201-
return `<li>
197+
return `<li>
202198
<a href="${childUrl}" class="ais-Hits-item">
203199
<div class="hit-name">${childTitle}</div>
204200
${childText ? `<p class="hit-breadcrumbs">${childText}</p>` : ''}

0 commit comments

Comments
 (0)