lsirivong / gatsby-plugin-modal-routing

A gatsby plugin for routable modals
44 stars 30 forks source link

remove prevRouterProps from shouldUpdateScroll #50

Closed misioq23 closed 4 years ago

misioq23 commented 4 years ago
  1. prevRouterProps's location cause an error when address contains section path e.g type: localhost:8000/#test
  2. prevRouterProps is unused in project
lsirivong commented 4 years ago

Hi @misioq23 thanks for the contribution!

I understand that this can be removed because it's an unused variable, but could you help me understand what you mean by "prevRouterProps's location cause an error when address contains section path"? What is the error that occurs, and how does this address that?

misioq23 commented 4 years ago

Hi @lsirivong, you are welcome!

I created simple repo.

  1. Run gatsby develop
  2. put localhost:8000/#second into the address bar (or another section id)
  3. "TypeError: Cannot read property 'location' of undefined" occurs
chardmd commented 4 years ago

@lsirivong, here's the screenshot of the error.

Screenshot 2020-06-28 at 3 06 11 PM

lsirivong commented 4 years ago

Thanks folks, sorry for the delay.