Changing check from nil to len based on slice
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -391,7 +391,7 @@ func (p *ControllerRegistor) InsertFilter(pattern string, pos int, filter Filter | ... | @@ -391,7 +391,7 @@ func (p *ControllerRegistor) InsertFilter(pattern string, pos int, filter Filter |
| 391 | if !RouterCaseSensitive { | 391 | if !RouterCaseSensitive { |
| 392 | pattern = strings.ToLower(pattern) | 392 | pattern = strings.ToLower(pattern) |
| 393 | } | 393 | } |
| 394 | if params == nil { | 394 | if len(params) == 0 { |
| 395 | mr.returnOnOutput = true | 395 | mr.returnOnOutput = true |
| 396 | } else { | 396 | } else { |
| 397 | mr.returnOnOutput = params[0] | 397 | mr.returnOnOutput = params[0] | ... | ... |
-
Please register or sign in to post a comment