You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's unfortunate it's a bug in the old version of path-to-regexp we use, and since it's so old, it may not get fixed. In the meantime, you can always use the path /:first(truc(muche)?)/bidule/:machin/:chose (i.e. give the first path segment a name and the regexp to metch for it).
Good news! This is now fixed in path-to-regexp 0.1.5, which is Express 4.x compatible! Bad news is we cannot yet moved to 0.1.5 until the following bug is fixed: pillarjs/path-to-regexp#55
I am using express (4.10.6) with a route that has a optional term.
The route work great as
/truc/bidule/head/foot
and/trucmuche/bidule/head/foot
is well routed tomy_function
.But there's a problem because when entering the function,the req.params is :
instead of what seems to be expected :
Strange !
Thanks for your help.
Doom.
The text was updated successfully, but these errors were encountered: