Update autocomplete.js

Updating for loop to modern forEach method to loop over node list and remove class.
This commit is contained in:
Andrew Rivera 2022-10-07 19:37:42 -07:00 committed by GitHub
parent 19595526cf
commit 54609a3ed8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,9 +147,7 @@ class Autocomplete {
deselectItem() {
const items = this.list.querySelectorAll('div.kpxcAutocomplete-active');
for (const item of items) {
item.classList.remove('kpxcAutocomplete-active');
}
items.forEach(item => item.classList.remove('kpxcAutocomplete-active'));
}
closeList() {