_Greg _ Posted June 9, 2020 Share Posted June 9, 2020 Hi! After 1-30 times of page reload (without update cache) i have Error On my app.js:13 code: window.addEventListener('load', function(){ gsap.registerPlugin(ScrollTrigger); ScrollTrigger.refresh(); }) I try to create codepen demo, but on codepen i did't see any errors on console How can i catch or debug this type of error? Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 9, 2020 Share Posted June 9, 2020 You shouldn't need this .refresh() there at all. ScrollTrigger automatically refreshes when needed. If that's not the case, please provide a minimal demo that shows a case where refresh isn't being fired when it should. Link to comment Share on other sites More sharing options...
_Greg _ Posted June 9, 2020 Author Share Posted June 9, 2020 Thank you! I find with ScrollTrigger.getAll() one element from list of triggers, witch get that error. I will try to fix it. I try disable ScrollTrigger.refresh(); but trigger did't work with my code well (wrong place triggers on the page) Link to comment Share on other sites More sharing options...
ZachSaucier Posted June 9, 2020 Share Posted June 9, 2020 It's pretty hard for us to debug blindly. A demo would be much appreciated. Link to comment Share on other sites More sharing options...
josh-warner Posted October 13, 2020 Share Posted October 13, 2020 I had this exact same error occurring except I was not manually calling .refresh() instead it was being triggered automatically by ScrollTrigger but still throwing an error only on random screen refreshes as above. I updated to the latest version (3.5.1) and it seems to have fixed the issue. 1 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