diff --git a/packages/client/src/store/routes.js b/packages/client/src/store/routes.js index c69bb83ef0..88ca90df73 100644 --- a/packages/client/src/store/routes.js +++ b/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