Commit 69b2bd9359ee60e0852ecfeb89a4216ce7945ae0
take(1) the old fashioned way
Charles Lehner committed on 7/26/2016, 5:18:12 AMParent: 9c3b24671aec2d6174e5b2b5e62fad374a710b3c
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -66,10 +66,13 @@ | ||
66 | 66 | pull.filter(function (update) { |
67 | 67 | return update.rev |
68 | 68 | && (lte ? update.timestamp <= lte : true) |
69 | 69 | }), |
70 | - pull.take(1) | |
71 | - )(null, cb) | |
70 | + pull.take(1), | |
71 | + pull.collect(function (err, links) { | |
72 | + cb(err, links && links[0]) | |
73 | + }) | |
74 | + ) | |
72 | 75 | }) |
73 | 76 | } |
74 | 77 | |
75 | 78 | function getRevs(prId, cb) { |
Built with git-ssb-web