1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-23 00:44:05 +00:00

Update ctx.go

This commit is contained in:
Fenny 2020-07-03 19:35:40 +02:00
parent 592545ac46
commit cdf45da5b1

2
ctx.go
View File

@ -650,7 +650,7 @@ func (ctx *Ctx) Params(key string, defaultValue ...string) (value string) {
return ctx.values[i]
}
}
if len(defaultValue) > 0 {
if len(defaultValue) > 0 && len(value) == 0 {
return defaultValue[0]
}
return