From 753d1f3d205334ea113dd162047480da27264358 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Fri, 11 Apr 2025 14:41:47 -0500 Subject: [PATCH] fix arrow on diff page --- internal/html/repo_commit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/html/repo_commit.go b/internal/html/repo_commit.go index 2a909db..93bc55c 100644 --- a/internal/html/repo_commit.go +++ b/internal/html/repo_commit.go @@ -51,7 +51,7 @@ func RepoCommitTemplate(rcc RepoCommitContext) Node { If(file.From.Path != "", A(Class("underline decoration-text/50 decoration-dashed hover:decoration-solid"), Href(fmt.Sprintf("/%s/tree/%s/%s", rcc.RepoHeaderComponentContext.Name, file.From.Commit, file.From.Path)), Text(file.From.Path)), ), - If(file.From.Path != file.To.Path, Text(" → ")), + If(file.From.Path != "" && file.To.Path != "", Text(" → ")), If(file.To.Path != "", A(Class("underline decoration-text/50 decoration-dashed hover:decoration-solid"), Href(fmt.Sprintf("/%s/tree/%s/%s", rcc.RepoHeaderComponentContext.Name, file.To.Commit, file.To.Path)), Text(file.To.Path)), ),