Merge pull request #2981 from TankTheFrank/fix_template_render_with_automatic_parameter_routing

fixes template rendering with automatic mapped parameters (see #2979)
This commit is contained in:
astaxie 2018-07-20 15:39:10 +08:00 committed by GitHub
commit c9b6e4f825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -943,7 +943,7 @@ func (p *ControllerRegister) handleParamResponse(context *beecontext.Context, ex
context.RenderMethodResult(resultValue)
}
}
if !context.ResponseWriter.Started && context.Output.Status == 0 {
if !context.ResponseWriter.Started && len(results) > 0 && context.Output.Status == 0 {
context.Output.SetStatus(200)
}
}