leftiness / react-demo

Other
0 stars 0 forks source link

Fix #43 Made router.generate() safe #44

Closed leftiness closed 8 years ago

leftiness commented 8 years ago

If the navigation reducer had undefined for the current route name, that would get sent down to the Link component, which would try to generate a URL with it. Then uniloc would throw an exception.

I wrapped the uniloc generate() function to safely return the 404 page.