mirror of
https://github.com/go-gitea/gitea
synced 2025-07-06 02:27:20 +00:00
Web editor: improve code quality
This commit is contained in:
@ -25,9 +25,9 @@ const (
|
||||
|
||||
func RefCommits(ctx *context.Context) {
|
||||
switch {
|
||||
case len(ctx.Repo.TreeName) == 0:
|
||||
case len(ctx.Repo.TreePath) == 0:
|
||||
Commits(ctx)
|
||||
case ctx.Repo.TreeName == "search":
|
||||
case ctx.Repo.TreePath == "search":
|
||||
SearchCommits(ctx)
|
||||
default:
|
||||
FileHistory(ctx)
|
||||
@ -104,7 +104,7 @@ func SearchCommits(ctx *context.Context) {
|
||||
func FileHistory(ctx *context.Context) {
|
||||
ctx.Data["IsRepoToolbarCommits"] = true
|
||||
|
||||
fileName := ctx.Repo.TreeName
|
||||
fileName := ctx.Repo.TreePath
|
||||
if len(fileName) == 0 {
|
||||
Commits(ctx)
|
||||
return
|
||||
|
Reference in New Issue
Block a user