Browse Source

Sort routes to ensure the client router always matches correctly

pull/903/head
Andrew Kingston 6 years ago
parent
commit
c9514cefc6
  1. 6
      packages/client/src/store/routes.js

6
packages/client/src/store/routes.js

@ -21,6 +21,12 @@ const createRouteStore = () => {
})
})
})
// Sort route by paths so that the router matches correctly
routes.sort((a, b) => {
return a.path > b.path ? -1 : 1
})
store.update(state => {
state.routes = routes
return state

Loading…
Cancel
Save