Skip to content

Commit 3f7f974

Browse files
committed
Changes Model.find() to check if cb is really a function (and not just "not null")
1 parent 1937f46 commit 3f7f974

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Model.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ function Model(opts) {
321321
});
322322
}
323323
});
324-
if (cb === null) {
324+
325+
if (typeof cb != "function") {
325326
return chain;
326327
}
327328

0 commit comments

Comments
 (0)