git ssb

30+

cel / git-ssb-web



Commit 1ba0ea701968920d00242b73ce3b017bbcffec28

Don't show "Older" link after initial commit

Charles Lehner committed on 4/12/2016, 6:26:23 PM
Parent: 5c44d260494ea080f8dc3bccd2392b5cf87db845

Files changed

index.jschanged
index.jsView
@@ -1265,18 +1265,17 @@
12651265 pull.once('<h3>Commits</h3>'),
12661266 pull(
12671267 repo.readLog(query.start || branch),
12681268 pull.take(20),
1269+ paramap(repo.getCommitParsed.bind(repo), 8),
12691270 paginate(
12701271 !query.start ? '' : function (first, cb) {
12711272 cb(null, '&hellip;')
12721273 },
1273- pull(
1274- paramap(repo.getCommitParsed.bind(repo), 8),
1275- pull.map(renderCommit.bind(this, repo))
1276- ),
1277- function (last, cb) {
1278- cb(null, '<a href="?start=' + last + '">Older</a>')
1274+ pull.map(renderCommit.bind(this, repo)),
1275+ function (commit, cb) {
1276+ cb(null, commit.parents && commit.parents[0] ?
1277+ '<a href="?start=' + commit.id + '">Older</a>' : '')
12791278 }
12801279 )
12811280 )
12821281 ]))

Built with git-ssb-web