forked from tangled.org/core
Monorepo for Tangled

appview: repo: fix potentially nil commit in branches

old knots will not attach a commit to a branch. sorting by commit time
fails in these responses.

Signed-off-by: oppiliappan <me@oppi.li>

authored by oppi.li and committed by Tangled 7d8fff21 6d3ed294

Changed files
+2 -2
appview
repo
+2 -2
appview/repo/repo.go
··· 119 119 if b.IsDefault { 120 120 return 1 121 121 } 122 - if a.Commit != nil { 122 + if a.Commit != nil && b.Commit != nil { 123 123 if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 124 124 return 1 125 125 } else { ··· 630 630 if b.IsDefault { 631 631 return 1 632 632 } 633 - if a.Commit != nil { 633 + if a.Commit != nil && b.Commit != nil { 634 634 if a.Commit.Committer.When.Before(b.Commit.Committer.When) { 635 635 return 1 636 636 } else {