Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9f558aa

Browse files
committed
fix 'listCommits' when only callback is given
1 parent 62b7395 commit 9f558aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Repository.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ class Repository extends Requestable {
187187
* @return {Promise} - the promise for the http request
188188
*/
189189
listCommits(options, cb) {
190-
options = options || {};
191-
190+
if (typeof options === 'function') {
191+
cb = options;
192+
options = {};
193+
}
192194
options.since = this._dateToISO(options.since);
193195
options.until = this._dateToISO(options.until);
194196

0 commit comments

Comments
 (0)