Skip to content

Commit 697e2d8

Browse files
committed
Fixes previous commit to avoid checking for sql_comparator on undefined
1 parent 7293df7 commit 697e2d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Drivers/DML/mongodb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function convertToDB(obj) {
183183
continue;
184184
}
185185

186-
if (typeof obj[k].sql_comparator == "function") {
186+
if (obj[k] && typeof obj[k].sql_comparator == "function") {
187187
var val = (k != "_id" ? obj[k].val : new mongodb.ObjectID(obj[k].val));
188188
var comp = obj[k].sql_comparator();
189189
var condition = {};

0 commit comments

Comments
 (0)