Jump to content
Search Community

ScrollTrigger.refresh() one of 30 times page reload get TypeError

_Greg _ test
Moderator Tag

Recommended Posts

Hi!

After 1-30 times of page reload (without update cache) i have Error image.png.3e2ed78324365ac083f18980612c52d4.png

On my app.js:13 code:

window.addEventListener('load', function(){
    gsap.registerPlugin(ScrollTrigger);
    ScrollTrigger.refresh();
})

image.png.158e9387d16535d2848600e478029482.png

 

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

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

  • 4 months later...

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.

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...