mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 02:32:17 +08:00
fix bug for nil interface
This commit is contained in:
parent
13042dfd4e
commit
b4d1b55cc2
@ -50,7 +50,7 @@ func mapForm(ptr interface{}, form map[string][]string) error {
|
||||
inputValue, exists := form[inputFieldName]
|
||||
|
||||
if !exists {
|
||||
if defaultValue.(string) == "" {
|
||||
if defaultValue == nil {
|
||||
continue
|
||||
}
|
||||
inputValue = make([]string, 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user