1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

Fix panic when no user is signed in

See #188
This commit is contained in:
Bwko 2016-11-19 12:43:10 +01:00
parent cf045b029c
commit fc3ed8a1de

View File

@ -23,6 +23,10 @@ func SetEditorconfigIfExists(ctx *context.Context) {
} }
func SetDiffViewStyle(ctx *context.Context) { func SetDiffViewStyle(ctx *context.Context) {
if !ctx.IsSigned {
return
}
var ( var (
userStyle = ctx.User.DiffViewStyle userStyle = ctx.User.DiffViewStyle
queryStyle = ctx.Query("style") queryStyle = ctx.Query("style")