Q: Error in different subpage of function which is not in use I have weird error of function which I am not even using.
In one subpage I targeted all the child elements of and ID and it worked fine, but when I go to different subpage I get error in my console that Uncaught TypeError: Cannot read property 'children' of null. And I think now I have conflict in my other subpage.
This code is from subpage which is giving me problems:
var artistTags = document.getElementById('musicArtists').children;
document.getElementById('filterMusic').addEventListener('click', toggleFilter);

And now I am doing another function which is hiding certain elements while onclick. This is the code:
var scheduleFriday = document.getElementById('scheduleFriday').style.display = "block";
function toggleScheduleFriday() {

  resetAll();
  if (scheduleFriday == true) {
    document.getElementById('scheduleSunday').style.display = "none";
    document.getElementById('scheduleSaturday').style.display = "none";
  }
}

Any ideas guys, how to fix the problem with the child elements? Thanks in advance!
