Quick Ugly Fix for Oauth not to make web_hack.go panic (#49653)

This commit is contained in:
Vardan Torosyan
2022-05-26 14:34:04 +02:00
committed by GitHub
parent 7cf321d7bd
commit 93f9792199

View File

@ -42,7 +42,9 @@ func wrap_handler(h web.Handler) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
ctx := getReqCtx(r.Context())
res := handle(ctx)
res.WriteTo(ctx)
if res != nil {
res.WriteTo(ctx)
}
}
case handlerCtx:
return func(w http.ResponseWriter, r *http.Request) {