Skip to content

Commit

Permalink
fix(router): Bug w/ nested routing re: updated path-to-regexp version
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyWebb committed Feb 5, 2019
1 parent f6f1f44 commit 53e5f03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/router/src/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ export class Route {
path = path.replace(/\/?!?$/, '/!')
}

if (path[path.length - 1] === '!') {
path = path.replace('!', ':__child_path__(.*)?')
if (path.endsWith('!')) {
path = path.replace('!', ':__child_path__(\\S*)?')
} else {
path = path.replace(/\(?\*\)?/, '(.*)')
}
Expand Down

0 comments on commit 53e5f03

Please sign in to comment.