Open sgeier opened 4 years ago
Do you need more information on the topic?
I'm encountering a similar issue when loading a component that uses locomotive scroll except I only see it during resizing.
I am destroying the instance when the component unmounts, then re-initing when it mounts the next time.
I am also facing the problem when the resize happens :)
@sgeier Have you found any workaround. I'm facing same issue :(
Unfortunately not. I got it to work somehow by initializing things with delays or changing the order of how things load.
I ended up not using locomotion because it doesn't work with middle mouse on windows which is wide spread among art ppl.
I'm having the same issue. Whenever I resize the browser I encounter a GatsbyJS: getTranslate() error!
In my case, figured it was something to do with routing using gatsby-link. So I replaced <Link>
with <a>
. I know it's a bad practice but the website I'm working on have just 2 main pages (Home & contact).
@BrandonLandgraffBranding are you using scrollTrigger or intersectionObserver in your project?
Hello 👋
I am seeing the below JS error actually spamming my console until scroller.update() is called. My setup uses Loadable components as well as lazy-loaded images - so a quite challenging setup for a scroller.
Describe the bug The error below appears during a page transition and slightly after as well it seems. If I start scrolling before the actual pages are completely rendered the console gets spammed with that error. In my case, I have only defined one data-scroll-section in my layout file.
console.error output
Uncaught TypeError: Cannot read property 'match' of undefined at getTranslate (locomotive-scroll.esm.js:1661) at _default.transform (locomotive-scroll.esm.js:2317) at locomotive-scroll.esm.js:2380 at Array.forEach (<anonymous>) at _default.transformElements (locomotive-scroll.esm.js:2335) at _default.checkScroll (locomotive-scroll.esm.js:2040) at locomotive-scroll.esm.js:1996
To Reproduce Steps to reproduce the behavior: The error appears when switching between views in GatsbyJS.
Expected behavior I expect the error not to appear.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Thank you 👊