projects
/
brackets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2de83a7
)
Use more widely supported forEach style
author
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 01:13:32 +0000
(20:13 -0500)
committer
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 01:13:32 +0000
(20:13 -0500)
frontend/index.js
patch
|
blob
|
blame
|
history
diff --git
a/frontend/index.js
b/frontend/index.js
index
bd10105
..
c46676d
100644
(file)
--- a/
frontend/index.js
+++ b/
frontend/index.js
@@
-133,9
+133,7
@@
window.onload = () => {
genreInput.addEventListener("input", (e) => {
const input = e.target;
- for (const item of genreList.children) {
- item.style.display = item.dataset.name.includes(input.value.toLowerCase()) ? "block" : "none";
- }
+ Array.from(genreList.children).forEach((item) => item.style.display= item.dataset.name.includes(input.value.toLowerCase()) ? "block" : "none");
});
genreInput.addEventListener("focus", (e) => {
genreList.style.display = "block";