Browse Source

Fix panic when no user is signed in

See #188
tags/v1.2.0-rc1
Bwko 8 years ago
parent
commit
5b557eb23c
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      routers/repo/middlewares.go

+ 4
- 0
routers/repo/middlewares.go 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")


Loading…
Cancel
Save