Replaced the for loop with the for-of loop in the search-as-you-type JavaScript of the account form.

This commit is contained in:
依瑪貓 2023-02-27 10:29:03 +08:00
parent f25c993b75
commit 83b5761bca

View File

@ -105,8 +105,8 @@ function initializeBaseAccountQuery() {
options.forEach(function (option) {
const queryValues = JSON.parse(option.dataset.queryValues);
let isMatched = false;
for (let i = 0; i < queryValues.length; i++) {
if (queryValues[i].includes(query.value)) {
for (const queryValue of queryValues) {
if (queryValue.includes(query.value)) {
isMatched = true;
break;
}