File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,20 +45,20 @@ function filterRepoFiles(keys) {
45
45
// Remove all tr
46
46
$ ( '#repo-find-files-table tbody' ) . empty ( ) ;
47
47
48
- let hit = false ;
48
+ let hit = 0 ;
49
49
const treeLink = $ ( '#tree-link' ) . val ( ) ;
50
50
for ( let i = 0 ; i < files . length ; i ++ ) {
51
- if ( i >= threshold ) break ;
51
+ if ( hit >= threshold ) break ;
52
52
53
53
const keysTrim = keys . trim ( ) ;
54
54
const hitIndexes = hitAllKeys ( keysTrim , files [ i ] ) ;
55
55
if ( hitIndexes . length > 0 && keysTrim . length === hitIndexes . length ) {
56
56
const textWithHl = addHighLightToHit ( files [ i ] , hitIndexes ) ;
57
57
generateTrWithHighlight ( treeLink , files [ i ] , textWithHl ) ;
58
- hit = true ;
58
+ hit ++ ;
59
59
}
60
60
}
61
- if ( hit ) {
61
+ if ( hit > 0 ) {
62
62
$ ( '#no-hit-prompt' ) . hide ( ) ;
63
63
} else {
64
64
$ ( '#no-hit-prompt' ) . show ( ) ;
You can’t perform that action at this time.
0 commit comments