Cannot read property 'elements' of null - Next JS #26
ivanjeremic
started this conversation in
General
Replies: 1 comment
-
|
Hi @ivanjeremic Please recreate the use case in CodeSandbox and I will have a look. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes I get this: TypeError: Cannot read property 'elements' of null | lottieRef.current.animationItem.renderer.elements[2];`
I have my ref and the code runs in
onDOMReady, I did everything to prevent SSR, I dynamically import it and setSSRtofalse, on the initial page load everything is fine but when I navigate through the Site and then go back to the page where the Lottie animation is I get this error.Any Idea why this is happening, I was sure the
onDOMLoadedmethod is safe and works stable but it seems something is messing things up, please help. ThanksBeta Was this translation helpful? Give feedback.
All reactions