turuslan / HackTimer

MIT License
491 stars 93 forks source link

Error On Remove Element #28

Closed JaffaKetchup closed 4 years ago

JaffaKetchup commented 4 years ago

Error In Console:

Uncaught TypeError: Cannot read property 'innerHTML' of null
    at unMinified.js:69
    at Worker.worker.onmessage (HackTimer.js:134)

Line 68 & 69 of unMinified.js:

window.backspaceClock[index] = setInterval(function(){
str = document.getElementById(x[0].id).innerHTML;

The unMinified.js file is from my library .

Explanation:

I am using this library as my library relies heavily on timing. I have even mentioned your library in the Getting Started section.

Why is this happening when I do this: document.getElementById("intro").parentNode.removeChild(document.getElementById("intro"));?

I have stopped the animation which stops all the loops, you can check out the unMinified.js file to see exactly what happens.

Shouldn't this library stop whatever is happening when whatever element is removed?

Thanks for such a great library!

JaffaKetchup commented 4 years ago

Fixed it! Sorry for being a pain! EDIT: Actually, I haven't (17/12/19), but there is nothing you can do. Thanks!