mirror of
https://github.com/astaxie/beego.git
synced 2025-06-20 16:00:18 +00:00
Changing check from nil to len based on slice
This commit is contained in:
@ -391,7 +391,7 @@ func (p *ControllerRegistor) InsertFilter(pattern string, pos int, filter Filter
|
||||
if !RouterCaseSensitive {
|
||||
pattern = strings.ToLower(pattern)
|
||||
}
|
||||
if params == nil {
|
||||
if len(params) == 0 {
|
||||
mr.returnOnOutput = true
|
||||
} else {
|
||||
mr.returnOnOutput = params[0]
|
||||
|
Reference in New Issue
Block a user