-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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(tree): reassign fullpath when register new node which the same current node #2366
fix(tree): reassign fullpath when register new node which the same current node #2366
Conversation
… current node the same new node
Codecov Report
@@ Coverage Diff @@
## master #2366 +/- ##
=======================================
Coverage 98.63% 98.63%
=======================================
Files 41 41
Lines 2349 2350 +1
=======================================
+ Hits 2317 2318 +1
Misses 18 18
Partials 14 14
Continue to review full report at Codecov.
|
Hi @appleboy , @thinkerou. Please help me review this pull request. |
"/project/:name", | ||
"/", | ||
"/news/home", | ||
"/news", | ||
"/simple-two/one", | ||
"/simple-two/one-two", | ||
"/project/:name/build/*params", | ||
"/project/:name/bui", |
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.
put these changes back and add a new route as above.
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.
Done @appleboy. I added new route.
…ContextHoldsFullPath
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
Proposed changes
While using func
context.FullPath()
, I encountered an issue that it always returns previous registered parent path. It's fine when I change the registration order.Example:
Result:
But, when I register with different the order of router, such as:
It's every thing so ok.
I have fix this bug and updated the test case.
Hope you spend your time review and accept my pull request with this issue.
Types of changes
Checklist