revert last commit

This commit is contained in:
Gerasimos (Makis) Maropoulos 2020-08-30 16:19:52 +03:00
parent 6ee69ffd1c
commit 65e60df44e
No known key found for this signature in database
GPG Key ID: 5DBE766BD26A54E7

View File

@ -2792,7 +2792,7 @@ func (ctx *Context) View(filename string, optionalViewModel ...interface{}) erro
layout := ctx.values.GetString(cfg.GetViewLayoutContextKey()) layout := ctx.values.GetString(cfg.GetViewLayoutContextKey())
var bindingData interface{} 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`. // a nil can override the existing data or model sent by `ViewData`.
bindingData = optionalViewModel[0] bindingData = optionalViewModel[0]
} else { } else {