FormidableLabs / redux-little-router

A tiny router for Redux that lets the URL do the talking.
MIT License
1.04k stars 113 forks source link

Routes ending in a slash are broken #276

Open RussianCow opened 6 years ago

RussianCow commented 6 years ago

All my routes are defined with trailing slashes. After upgrading from 14.2.0 to 14.3.0, my routes are broken and don't get matched by the router.

Example of how my routes look:

const routes = {
  '/': {},
  '/profile/': {},
  '/users/:id/': {},
  // ...etc...
}

Using the above example, if I visit /profile/, state.router.route is undefined. This worked fine in 14.2.0. Is this intended behavior? And if so, how do I enforce trailing slashes on all my routes?

Thanks!