Commit 1ba0ea701968920d00242b73ce3b017bbcffec28
Don't show "Older" link after initial commit
Charles Lehner committed on 4/12/2016, 6:26:23 PMParent: 5c44d260494ea080f8dc3bccd2392b5cf87db845
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -1265,18 +1265,17 @@ | ||
1265 | 1265 | pull.once('<h3>Commits</h3>'), |
1266 | 1266 | pull( |
1267 | 1267 | repo.readLog(query.start || branch), |
1268 | 1268 | pull.take(20), |
1269 | + paramap(repo.getCommitParsed.bind(repo), 8), | |
1269 | 1270 | paginate( |
1270 | 1271 | !query.start ? '' : function (first, cb) { |
1271 | 1272 | cb(null, '…') |
1272 | 1273 | }, |
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>' : '') | |
1279 | 1278 | } |
1280 | 1279 | ) |
1281 | 1280 | ) |
1282 | 1281 | ])) |
Built with git-ssb-web