I use gatsby-image-background-slider on my project and it triggers TypeError: Cannot read property 'style' of undefined changeIndex src/index.js:111 callback src/index.js:129.
The same hero worked initially, but during the development, it started giving this error. I have reinstalled packages, tried with a new hello-world-project with the same code.
Hero.js
import React from "react"
import { useStaticQuery, graphql } from "gatsby"
import BackgroundSlider from 'gatsby-image-background-slider'
const Hero = ({ children }) => (
<>
<main>{children}</main>
<BackgroundSlider
query={useStaticQuery(graphql`
query {
backgrounds: allFile (filter: {sourceInstanceName: {eq: "backgrounds"}}){
nodes {
relativePath
childImageSharp {
fluid (maxWidth: 4000, quality: 100){
...GatsbyImageSharpFluid
}
}
}
}
}
`)}
initDelay={2}
transition={4}
duration={8}
images={["picture2.jpg", "picture2.jpg"]}
>
</BackgroundSlider>
</>
)
export default Hero
Do you know what could be causing this?