Skip to content

Commit

Permalink
fix 'listCommits' when only callback is given
Browse files Browse the repository at this point in the history
  • Loading branch information
WJXHenry committed May 3, 2019
1 parent 62b7395 commit 9f558aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ class Repository extends Requestable {
* @return {Promise} - the promise for the http request
*/
listCommits(options, cb) {
options = options || {};

if (typeof options === 'function') {
cb = options;
options = {};
}
options.since = this._dateToISO(options.since);
options.until = this._dateToISO(options.until);

Expand Down

0 comments on commit 9f558aa

Please sign in to comment.