Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

"state.router.params" can be undefined (inconsistency) #225

Open
jahed opened this issue Aug 26, 2017 · 1 comment
Open

"state.router.params" can be undefined (inconsistency) #225

jahed opened this issue Aug 26, 2017 · 1 comment

Comments

@jahed
Copy link

jahed commented Aug 26, 2017

I've noticed that if a path is not defined in the routes and you have any code that relies on state.router.params.someParam, it needs to first check if params is defined to safely get it.

This isn't a huge problem as it's easy to workaround, but it's inconsistent with state.router.query which is always defined, even on unknown routes.

Personally, it'd be convenient if params was always there, even as an empty object.

Thoughts?

@mikbur
Copy link

mikbur commented Oct 6, 2017

I hade a similar problem du to special characters in the url, make shure each part of the url is encodeURIComponent('123=') before addining it to the url

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants