-
Notifications
You must be signed in to change notification settings - Fork 140
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
fix: fastify issue 3129 #194
Conversation
if (node === null) return null | ||
var decoded = fastDecode(path.slice(-len)) | ||
if (decoded === null) { | ||
return this.onBadUrl !== null | ||
? this._onBadUrl(path.slice(-len)) | ||
: null | ||
} | ||
var handle = node.handlers[0] | ||
|
||
var handle = derivedConstraints !== undefined ? node.getMatchingHandler(derivedConstraints) : node.unconstrainedHandler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use the same pattern at https://github.com/delvedor/find-my-way/blob/master/index.js#L380 for consistency. And only unconstrainedHandler
contains what we need to compute paramsObj
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💪 LGTM, thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes: fastify/fastify#3129
Before
After