-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is this.path
set to undefined instead of path
?
#122
Comments
Related expressjs/express#5961 |
It seems that Let me explain my thought process: Layers are added to the Router instance when the The We can't know which of the possible To address the issue discussed in express#5961, perhaps we could add an extra property to the Layer instance, such as @pillarjs/express-tc, can we get your input on this matter? |
Thank you for the explanation @carpasse. I still have some confusion, for example, the actual matching against a request's path happens at runtime. However, if we set the Edit: Since the PS: I really have very little idea, I am trying to get a better understanding. Edit: I wonder whether any other part depends on |
@IamLizu I believe the
Additionally, the
|
cc @wesleytodd as repo captain |
Yep pretty much what @carpasse has said. One thing I might ask is "what is the goal of the question"? Did you have an outcome you are looking to achieve, or is this more about exploration and learning? If the goal is listing all the routes (as is referenced near the top) then there are a bunch of discussions on that that might provide more context. But before spending time (I still have nearly 300 issues I am trying to catch up on), can I ask for a more clear explanation of the goal? |
Thanks @carpasse for the explanation. I will read thoroughly and get back you if I still have questions. @wesleytodd actually the outcome is nothing else than listing the routes. It appears setting the |
Can someone please help me understand why
this.path
is set toundefined
?router/lib/layer.js
Line 43 in 2e7fb67
I had checked the router Layer, and the path was
undefined
in almost every route, that shouldn't be the case, right?While I don't know the reason of it being set to
undefined
initially, I can suggest it should be set topath
. I have noticed that thepath
on Layer is no longer undefined if we set,Instead, it gets correct path such as
/users
or whatever the path actually is.The text was updated successfully, but these errors were encountered: