alvarotrigo / react-fullpage

Official React.js wrapper for fullPage.js https://alvarotrigo.com/react-fullpage/
GNU General Public License v3.0
1.28k stars 179 forks source link

Crash on reloading a page with slide anchor #436

Open BenjaminSYD opened 6 months ago

BenjaminSYD commented 6 months ago

Description

When using data-anchor with slides, if I reload a page with a slide anchor in the url the app crashes with error message "can't access property "item", r.activeSlide is null".

Link to isolated reproduction with no external CSS / JS

codesandbox link

Steps to reproduce it

  1. Open codesandbox link.
  2. Go to "Slide2" using right arrow button.
  3. Notice that "#section1/Slide2" is added to the url.
  4. Reload the page inside codesandbox (not codesandbox itself).
  5. Observe the application crash.

Versions

Versions can be found within the Codesandbox link provided.

alvarotrigo commented 6 months ago

I'm not able to reproduce this issue outside codesandbox. Have you tried it outside?

BenjaminSYD commented 6 months ago

I can reproduce it in a larger-scale project (I can't share it), but not in a minimalist one.

My assumption is that it could be a concurrency issue occurring in slower environments (heavy app or codesandbox). I will try to reproduce it again another time.