samuelOsborne / Lottie-interactive

Lottie interactive is a custom element adding multiple types of interactivity to Lottie animations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read properties of undefined (reading 'removeListener')

dlogvin opened this issue · comments

Not sure why, but it's clearly bugging me out the fact that I'm getting this error after an onClick() event.

Let me show some of my code:

<a onClick={() => { activateAnimation(); play(); }} className={styles.card}>
    <h2>Test  &rarr;</h2>
    <p>Test.</p>
</a>

The function:

const activateAnimation = () => {
    setPopup(true);
    setAnimation(true);
}

Using Lottie-interactive:

<lottie-interactive
    style={{ height: 400, width: 200 }}
    path='https://assets7.lottiefiles.com/packages/lf20_5z8txnjm.json'
    autoplay
    loop
/>{ ' ' }

Maybe I'm doing something wrong?