File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 673673 . then ( res => res . json ( ) )
674674 . then ( scenesJson => {
675675 return s => {
676+ console . log ( "scenes.json" ) ;
676677 const maxResults = 12 ;
677678 if ( s ) {
678679 const regexps = s . split ( / \s / ) . filter ( s => ! ! s ) . map ( s => new RegExp ( escapeRegExp ( s ) , 'i' ) ) ;
679- const sceneResults = [ ] ;
680+ const results = [ ] ;
680681 for ( let i = 0 ; i < scenesJson . length ; i ++ ) {
681682 const site = scenesJson [ i ] ;
682683 if ( regexps . some ( regexp => regexp . test ( site . label ) || regexp . test ( site . url ) ) ) {
683- sceneResults . push ( site ) ;
684- if ( sceneResults . length >= maxResults ) {
684+ results . push ( site ) ;
685+ if ( results . length >= maxResults ) {
685686 break ;
686687 }
687688 }
688689 }
689- console . log ( "scenes.json --- sceneResults = " + sceneResults ) ;
690- return sceneResults ;
690+ return results ;
691691 } else {
692- console . log ( "scenes.json --- maxResults = " + maxResults ) ;
693692 return scenesJson . slice ( 0 , maxResults ) ;
694693 }
695694 } ;
You can’t perform that action at this time.
0 commit comments