Skip to content

Conversation

@akeyhero
Copy link

@akeyhero akeyhero commented Mar 23, 2020

Hi.

I think we should inspect that e.state.path is not null nor undefined
because anyone can call .pushState with an arbitrary state argument.
https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent

I actually encountered this problem when I use an out-of-control external js code, which calls .pushState.

This should fix #293 .

This inspection of e.state.path is needed
because anyone can call .pushState with an arbitrary state argument.
@coveralls
Copy link

coveralls commented Mar 23, 2020

Coverage Status

Coverage remained the same at 92.562% when pulling 6bba5c2 on akeyhero:fix-errors-due-to-no-path into 94138d1 on visionmedia:master.

@akeyhero akeyhero changed the title Fix errors thrown when e.g. an external code calls .pushState without path. Fix the errors in the case that e.g. an external code calls .pushState without path. Mar 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change history state during navigation, break page.js

2 participants