1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

revert last commit

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-30 16:19:52 +03:00
parent 6ee69ffd1c
commit 65e60df44e

View File

@@ -2792,7 +2792,7 @@ func (ctx *Context) View(filename string, optionalViewModel ...interface{}) erro
layout := ctx.values.GetString(cfg.GetViewLayoutContextKey())
var bindingData interface{}
if len(optionalViewModel) > 0 && optionalViewModel[0] != nil {
if len(optionalViewModel) > 0 /* Don't do it: can break a lot of servers: && optionalViewModel[0] != nil */ {
// a nil can override the existing data or model sent by `ViewData`.
bindingData = optionalViewModel[0]
} else {