Commit bb72c91b2394510f36c8f5c39558cbb8704d3d52
Handle pull requests without commits
Fix %MCaoK15PduM4sB4XL3MQ9XbnObto/8CnyyK2TLlkzhY=.sha256cel committed on 10/20/2016, 7:33:31 PM
Parent: 3e5813ecfd4f03ed16cdb421b2e6aeb2c5880419
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -85,11 +85,14 @@ | ||
85 | 85 … | function (err, headUpdate) { |
86 | 86 … | if (err) return cb(err) |
87 | 87 … | // get the rev of base when head was last updated |
88 | 88 … | getBranchLastUpdate(pr.baseRepo, pr.baseBranch, |
89 | - headUpdate.timestamp, function (err, baseUpdate) { | |
89 … | + headUpdate && headUpdate.timestamp, function (err, baseUpdate) { | |
90 | 90 … | if (err) return cb(err) |
91 | - cb(null, {base: baseUpdate.rev, head: headUpdate.rev}) | |
91 … | + cb(null, { | |
92 … | + base: baseUpdate && baseUpdate.rev, | |
93 … | + head: headUpdate && headUpdate.rev | |
94 … | + }) | |
92 | 95 … | }) |
93 | 96 … | }) |
94 | 97 … | }) |
95 | 98 … | } |
Built with git-ssb-web