micku7zu/vanilla-tilt.js

error on destroy() - .style of null

Closed this issue · 4 comments

I believe adding clearTimeout(this.transitionTimeout); in destroy method should fix the problem.
Right now i have no time for pull request :(

Fixing it today, thanks for the catch!

and also have to clean requestAnimationFrame on destroy

if (this.updateCall !== null) {
  cancelAnimationFrame(this.updateCall);
}

I have to do this, I hope this weekend

Done. Thanks!