From bc5f16d5b4d29a3ef010a7cbcda411c915cb9fcd Mon Sep 17 00:00:00 2001 From: Livio Amstutz Date: Thu, 9 Jul 2020 17:44:35 +0200 Subject: [PATCH] fix: render login (#432) --- internal/ui/login/handler/login_handler.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/ui/login/handler/login_handler.go b/internal/ui/login/handler/login_handler.go index 8b95692b07..9839f511e4 100644 --- a/internal/ui/login/handler/login_handler.go +++ b/internal/ui/login/handler/login_handler.go @@ -56,9 +56,13 @@ func (l *Login) renderLogin(w http.ResponseWriter, r *http.Request, authReq *mod if err != nil { errMessage = l.getErrorMessage(r, err) } + loginName := "" + if authReq != nil { + loginName = authReq.LoginName + } data := userData{ baseData: l.getBaseData(r, authReq, "Login", errType, errMessage), - LoginName: authReq.LoginName, + LoginName: loginName, } l.renderer.RenderTemplate(w, r, l.renderer.Templates[tmplLogin], data, nil) }