1
0
mirror of https://github.com/volatiletech/authboss.git synced 2024-11-24 08:42:17 +02:00

Fix nil bug in responder

This commit is contained in:
Aaron L 2018-04-30 18:17:40 -07:00
parent 4aa961f758
commit 3c6c19e2e8

View File

@ -27,6 +27,9 @@ func NewResponder(renderer authboss.Renderer) *Responder {
func (r *Responder) Respond(w http.ResponseWriter, req *http.Request, code int, page string, data authboss.HTMLData) error {
ctxData := req.Context().Value(authboss.CTXKeyData)
if ctxData != nil {
if data == nil {
data = authboss.HTMLData{}
}
data.Merge(ctxData.(authboss.HTMLData))
}