You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.
I've built a few sites using roadtrip, and there's an infrequent bug I've been noticing when navigating between routes:
Uncaught TypeError: Cannot read property 'x' of undefined
Here's the roadtrip code related to the error (though I imagine you can guess what it is):
_target={href: location$1.href,scrollX: scroll.x,// <--- the source of the errorscrollY: scroll.y,popstate: true,// so we know not to manipulate the historyfulfil: noop,reject: noop};
Steps to reproduce
Open a page powered by roadtrip
Navigate to any route
Click the browser back button in the browser UI to return to the previous route
Refresh the page using the browser UI
Press the forward button in the browser UI to return to the previous route
I believe what is likely happening here is that refreshing the page clears road trip's scrollHistory, but roadtrip doesn't have a fallback for when a matching entry in the scroll history doesn't exist. Maybe?
The text was updated successfully, but these errors were encountered:
Kiho
pushed a commit
to Kiho/roadtrip
that referenced
this issue
Feb 9, 2019
I've built a few sites using roadtrip, and there's an infrequent bug I've been noticing when navigating between routes:
Uncaught TypeError: Cannot read property 'x' of undefined
Here's the roadtrip code related to the error (though I imagine you can guess what it is):
Steps to reproduce
I believe what is likely happening here is that refreshing the page clears road trip's
scrollHistory
, but roadtrip doesn't have a fallback for when a matching entry in the scroll history doesn't exist. Maybe?The text was updated successfully, but these errors were encountered: