Fix panic when no user is signed in

See #188
release/v1.15
Bwko 2016-11-19 12:43:10 +01:00
parent cf045b029c
commit fc3ed8a1de
1 changed files with 4 additions and 0 deletions

View File

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