micku7zu / vanilla-tilt.js

A smooth 3D tilt javascript library.
https://micku7zu.github.io/vanilla-tilt.js/index.html
MIT License
3.85k stars 172 forks source link

fix: fix error element has been destroyed #131

Closed weishaodaren closed 1 year ago

weishaodaren commented 1 year ago

fix: Cannot read properties of null (reading 'style')

micku7zu commented 1 year ago

Can you please provide more details when this can happen?

What to do to replicate the error?

Thanks for pull request.

weishaodaren commented 1 year ago

Can you please provide more details when this can happen?

What to do to replicate the error?

Thanks for pull request.

image Click the Destroy button

micku7zu commented 1 year ago

Oh, yea. I missed that. Thanks!

Unfortunately, your fix will fix the JS error, but not the actual code logic error.

I will fix it.

micku7zu commented 1 year ago

Thanks for pull request. I fixed it and released 1.8.1: https://github.com/micku7zu/vanilla-tilt.js/commit/967ab1accf4fdf5ce8a67eeac146e3035a7fe5be