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,8 +151,10 @@
|
|||
|
||||
for (let i = 0; i < collection.length; i++) {
|
||||
let curr = collection[i];
|
||||
if (curr.firstChild.firstChild.classList.contains("audiotrack")) {
|
||||
curr.style.backgroundColor = "rgba(251, 73, 52, 0.7)"
|
||||
if (curr.firstChild.firstChild !== null) {
|
||||
if (curr.firstChild.firstChild.classList.contains("audiotrack")) {
|
||||
curr.style.backgroundColor = "rgba(251, 73, 52, 0.7)"
|
||||
}
|
||||
}
|
||||
|
||||
// Append buttons to list
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue