diff options
Diffstat (limited to 'internal/route/repo/commit.go')
-rw-r--r-- | internal/route/repo/commit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/repo/commit.go b/internal/route/repo/commit.go index ae424d06..3e09bd06 100644 --- a/internal/route/repo/commit.go +++ b/internal/route/repo/commit.go @@ -25,7 +25,7 @@ const ( func RefCommits(c *context.Context) { c.Data["PageIsViewFiles"] = true switch { - case len(c.Repo.TreePath) == 0: + case c.Repo.TreePath == "": Commits(c) case c.Repo.TreePath == "search": SearchCommits(c) @@ -85,7 +85,7 @@ func SearchCommits(c *context.Context) { c.Data["PageIsCommits"] = true keyword := c.Query("q") - if len(keyword) == 0 { + if keyword == "" { c.Redirect(c.Repo.RepoLink + "/commits/" + c.Repo.BranchName) return } |