Skip to content

Commit

Permalink
Update collection.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 authored May 18, 2023
1 parent 621d825 commit 05eca74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/drivers/node-mongodb-native/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ function iter(i) {

if (debug) {
if (typeof debug === 'function') {
let range = '';
let argsToAdd = null;
if (typeof args[args.length - 1] == 'function') {
range = args.slice(0, args.length - 1);
argsToAdd = args.slice(0, args.length - 1);
} else {
range = args.slice(0, args.length);
argsToAdd = args;
}
debug.apply(_this,
[_this.name, i].concat(range));
[_this.name, i].concat(argsToAdd));
} else if (debug instanceof stream.Writable) {
this.$printToStream(_this.name, i, args, debug);
} else {
Expand Down

0 comments on commit 05eca74

Please # to comment.