From bd473b0314ad7488c45795a8c692ac201182f46a Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 18 Jan 2022 22:06:40 +0000 Subject: [PATCH] Use const keyword for constant arrays --- assets/ts/search.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/ts/search.tsx b/assets/ts/search.tsx index 6dccf6b..68db7b3 100644 --- a/assets/ts/search.tsx +++ b/assets/ts/search.tsx @@ -76,7 +76,7 @@ class Search { lastIndex = 0, charCount = 0; - let resultArray: string[] = []; + const resultArray: string[] = []; while (i < matches.length) { const item = matches[i]; @@ -139,7 +139,7 @@ class Search { }).join('|'), 'gi'); for (const item of rawData) { - let titleMatches: match[] = [], + const titleMatches: match[] = [], contentMatches: match[] = []; let result = {