Jump to content
Search Community

Error running Scrolltrigger.matchmedia() and Storybook: _win is undefined

Marcello test
Moderator Tag

Recommended Posts

I have a Next.js/React project with typescript and Storybook: when using Scrolltrigger.matchmedia() function the component always give an error when running inside Storybook:

_win is undefined

matchMedia@http://localhost:6006/vendors~main.d3f7aa1f55228e485314.hot-update.js:1541:10

 

Removing matchmedia it all works as expected, but I need it in the project, this is very upsetting...

 

You can find the demo code here on github: https://github.com/marcello-palmitessa/gsap-scrolltrigger-issues-demo

 

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...