benrbnt Posted June 23, 2023 Share Posted June 23, 2023 Hello, I just upgraded to 3.12.1 from 3.11.5, and ScrollTrigger crash when I go to a page with a scroll restauration, containing a ScrollTrigger with {once: true}. I can't manage to reproduce it in a Codepen, I still did one: ... I feel like ScrollTrigger is trying to refresh an already killed (due to the once: true) one. I have errors like: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'end') const tl = gsap.timeline({ scrollTrigger: { start: 'top 90%', end: 'bottom 10%', trigger: '.element', once: true, toggleActions: 'play none play none', }, }); See the Pen ZEmBBVq by benjaminrobinet (@benjaminrobinet) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted June 23, 2023 Share Posted June 23, 2023 A few questions: If you paste the SAME code as the CodePen demo into your "real" project, are you saying that generates an error (or crash)? Is there any way you can provide some kind of demo that reproduces the issue? It's just super hard for us to troubleshoot blind. Once we can reproduce it, I'm confident we'll be able to figure it out. Do you maybe have components in your project that are using an old version and some with the new version? Have you tried clearing all caches, including for your build process and make sure everything is using a consistent version? Are you using any framework like React? If so, are you using gsap.context()? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now