Skip to content
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

set a new route ctx if rctx is nil #878

Closed
wants to merge 1 commit into from

Conversation

shedyfreak
Copy link

PR to solve #839

Comment on lines +58 to +60
if rctx == nil {
rctx = chi.NewRouteContext()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move this check above line 54 and replace if rctx != nil?

@VojtechVitek
Copy link
Contributor

Hey @shedyfreak, @yurineydachin, @AndreiOslin,

I'm just checking back on this PR and I wonder -- how do you trigger the #839 panic? Under what circumstance is the route context nil?

Might be helpful to provide a test case for this too.

@shedyfreak what's your thoughts on #878 (comment) ?

@VojtechVitek
Copy link
Contributor

It looks like #841 was submitted first and has a test case too. I'll follow up there.

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants