aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-findfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/repo-findfile.js')
-rw-r--r--web_src/js/features/repo-findfile.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/repo-findfile.js b/web_src/js/features/repo-findfile.js
index 945eeeceff..828acfa65c 100644
--- a/web_src/js/features/repo-findfile.js
+++ b/web_src/js/features/repo-findfile.js
@@ -55,8 +55,8 @@ export function filterRepoFilesWeighted(files, filter) {
const filterLower = filter.toLowerCase();
// TODO: for large repo, this loop could be slow, maybe there could be one more limit:
// ... && filterResult.length < threshold * 20, wait for more feedbacks
- for (let i = 0; i < files.length; i++) {
- const res = strSubMatch(files[i], filterLower);
+ for (const file of files) {
+ const res = strSubMatch(file, filterLower);
if (res.length > 1) { // length==1 means unmatched, >1 means having matched sub strings
filterResult.push({matchResult: res, matchWeight: calcMatchedWeight(res)});
}