Skip to content

Commit f11cf68

Browse files
committed
Fix db.collections not recognizing callback
1 parent 7fc98ee commit f11cf68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/database.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ export default class Database {
108108
}
109109

110110
collections (excludeSystem, cb) {
111+
if (typeof excludeSystem === 'function') {
112+
cb = excludeSystem
113+
excludeSystem = undefined
114+
}
111115
const {promise, callback} = this._connection.promisify(cb)
112116
this.listCollections(
113117
excludeSystem,

0 commit comments

Comments
 (0)