Check if element has two children before highlighting
This commit is contained in:
parent
80aa3d0f4b
commit
b7c8d7821d
1 changed files with 4 additions and 2 deletions
|
|
@ -151,9 +151,11 @@
|
||||||
|
|
||||||
for (let i = 0; i < collection.length; i++) {
|
for (let i = 0; i < collection.length; i++) {
|
||||||
let curr = collection[i];
|
let curr = collection[i];
|
||||||
|
if (curr.firstChild.firstChild !== null) {
|
||||||
if (curr.firstChild.firstChild.classList.contains("audiotrack")) {
|
if (curr.firstChild.firstChild.classList.contains("audiotrack")) {
|
||||||
curr.style.backgroundColor = "rgba(251, 73, 52, 0.7)"
|
curr.style.backgroundColor = "rgba(251, 73, 52, 0.7)"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Append buttons to list
|
// Append buttons to list
|
||||||
curr.appendChild(refreshButton());
|
curr.appendChild(refreshButton());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue