Browse Source

Fix panic when no user is signed in

See #188
tags/v1.21.12.1
Bwko 9 years ago
parent
commit
fc3ed8a1de
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