Merge pull request #196 from Bwko/fix/commit-view-panic
Fix panic when no user is signed inrelease/v1.15
commit
bd13c81684
|
@ -23,9 +23,15 @@ func SetEditorconfigIfExists(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetDiffViewStyle(ctx *context.Context) {
|
func SetDiffViewStyle(ctx *context.Context) {
|
||||||
|
queryStyle := ctx.Query("style")
|
||||||
|
|
||||||
|
if !ctx.IsSigned {
|
||||||
|
ctx.Data["IsSplitStyle"] = queryStyle == "split"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
userStyle = ctx.User.DiffViewStyle
|
userStyle = ctx.User.DiffViewStyle
|
||||||
queryStyle = ctx.Query("style")
|
|
||||||
style string
|
style string
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue