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
I've been seeing some error reports from inside of Davis.Request:
Uncaught TypeError: Cannot call method 'split' of undefined
which corresponds to this line:
this.queryString=raw.fullPath.split("?")[1];
I've only seen these errors come from Hoptoad. I haven't been able to reproduce locally from inside my app.
The only code path I can imagine this happening is when a Davis.Request object is constructed from event.state on a popstate event.
I've noticed this exact error happening in the test suite inside of the "binding and triggering the pop state event" test. Davis.Request doesn't know how to rebuild itself from "foo".
In general, I don't like writing defensive code, but I wonder if it makes sense to do some sanity checking on the data inside of event.state.
The text was updated successfully, but these errors were encountered:
In the latest release, which I'll push later today, I have made sure that there are defaults when creating a Davis.Request, this should stop these errors showing up. I've also been a bit more careful about the data that we pull out of the state object, making sure it is something that Davis put in the state object before using that data to build a request. Hopefully this will mean this error goes away now.
I've been seeing some error reports from inside of Davis.Request:
Uncaught TypeError: Cannot call method 'split' of undefined
which corresponds to this line:
I've only seen these errors come from Hoptoad. I haven't been able to reproduce locally from inside my app.
The only code path I can imagine this happening is when a Davis.Request object is constructed from event.state on a popstate event.
I've noticed this exact error happening in the test suite inside of the "binding and triggering the pop state event" test. Davis.Request doesn't know how to rebuild itself from "foo".
In general, I don't like writing defensive code, but I wonder if it makes sense to do some sanity checking on the data inside of event.state.
The text was updated successfully, but these errors were encountered: