mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-13 00:59:29 +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 {
|
if key == ContextKey {
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
if val, exists := c.Get(keyAsString); exists {
|
if val, exists := c.Get(key); exists {
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
if !c.hasRequestContext() {
|
if !c.hasRequestContext() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user