mirror of
https://github.com/go-gitea/gitea
synced 2025-07-24 11:18:36 +00:00
Remove check for negative length (#5120)
This commit is contained in:
committed by
techknowlogick
parent
583b1b8429
commit
5a4648cdd6
@@ -80,7 +80,7 @@ import (
|
||||
func sudo() macaron.Handler {
|
||||
return func(ctx *context.APIContext) {
|
||||
sudo := ctx.Query("sudo")
|
||||
if len(sudo) <= 0 {
|
||||
if len(sudo) == 0 {
|
||||
sudo = ctx.Req.Header.Get("Sudo")
|
||||
}
|
||||
|
||||
|
@@ -213,7 +213,7 @@ func Issues(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if len(userRepoIDs) <= 0 {
|
||||
if len(userRepoIDs) == 0 {
|
||||
userRepoIDs = []int64{-1}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user