-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hi,
Thanks for the great code, I am using node(0.5.4) + mongodb native(0.9.6-10),
and an error("Cannot use 'in' operator to search for 'limit' in undefined") occurred while call 'DB.find(...)'
if (test[idx] in fields) {
^
TypeError: Cannot use 'in' operator to search for 'limit' in undefined
at String.IN (native)
at Collection.find (D:\node\node_modules\mongodb\lib\mongodb\collection.js:602:24)
at D:\node\ListenToMongo.js:189:20
at [object Object].collection (D:\node\node_modules\mongodb\lib\mongodb\db.js:176:12)
at EventEmitter. (D:\node\ListenToMongo.js:188:13)
at EventEmitter. (D:\node\ListenToMongo.js:126:57)
at EventEmitter.emit (events.js:67:17)
at D:\node\ListenToMongo.js:69:17
at D:\node\node_modules\mongodb\lib\mongodb\db.js:81:14
at D:\node\node_modules\mongodb\lib\mongodb\connections\server.js:77:11
I fix it by adding following code at line 185:
else query_params = {}
I wonder if there is better solution?