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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy