1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-18 12:14:15 +00:00

Changing check from nil to len based on slice

This commit is contained in:
Bill Davis 2014-10-08 09:21:34 -04:00
parent b6f789c497
commit 1ba7847913

View File

@ -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]