mirror of
https://github.com/gin-gonic/gin.git
synced 2026-01-12 09:36:59 +08:00
Fix key retrieval in context.go
This commit is contained in:
parent
c08ca6ebb3
commit
2ef64e8946
@ -1436,7 +1436,7 @@ func (c *Context) Value(key any) any {
|
||||
if key == ContextKey {
|
||||
return c
|
||||
}
|
||||
if val, exists := c.Get(keyAsString); exists {
|
||||
if val, exists := c.Get(key); exists {
|
||||
return val
|
||||
}
|
||||
if !c.hasRequestContext() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user