File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -185,28 +185,27 @@ const app = createApp({
185185 } ,
186186 async resetAndSearch ( ) {
187187 this . resetAndMarkLoading ( )
188- await this . _searchBatch ( this . initialTimeout )
188+ await this . _searchBatch ( this . loading , this . initialTimeout )
189189 } ,
190190 async searchMore ( ) {
191191 if ( this . loading ) {
192192 return // Already searching
193193 }
194194 this . loading = new AbortController ( ) ;
195195 this . search . page = this . search . page + 1
196- await this . _searchBatch ( this . moreTimeout )
196+ await this . _searchBatch ( this . loading , this . moreTimeout )
197197 } ,
198198 _resetResults ( ) {
199199 this . search . page = 0
200200 this . search . result . hits = [ ]
201201 this . search . result . hasMoreHits = false
202202 } ,
203- async _searchBatch ( timeout ) {
204- if ( ! this . hasInput ) {
205- // No input => no search
206- return
207- }
208- const controller = this . loading
203+ async _searchBatch ( controller , timeout ) {
209204 try {
205+ if ( ! this . hasInput ) {
206+ // No input => no search
207+ return
208+ }
210209 if ( this . hasInputWithTooFewChars ) {
211210 throw 'Too few characters'
212211 }
You can’t perform that action at this time.
0 commit comments