mirror of
https://github.com/micku7zu/vanilla-tilt.js
synced 2024-06-09 01:02:13 +02:00
fix: fix error element has been destroyed
This commit is contained in:
parent
f4a557955d
commit
88c48e1b7c
|
@ -381,7 +381,9 @@ export default class VanillaTilt {
|
|||
if (this.glare) this.glareElement.style.transition = `opacity ${this.settings.speed}ms ${this.settings.easing}`;
|
||||
|
||||
this.transitionTimeout = setTimeout(() => {
|
||||
this.element.style.transition = "";
|
||||
if (this.element) {
|
||||
this.element.style.transition = "";
|
||||
}
|
||||
if (this.glare) {
|
||||
this.glareElement.style.transition = "";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue