Skip to content

Commit

Permalink
Fixed when params is null
Browse files Browse the repository at this point in the history
  • Loading branch information
meritt committed Feb 7, 2012
1 parent 1383e1a commit c8d5561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.coffee
Expand Up @@ -31,7 +31,7 @@ class EasyMongo

find: (table, params, after = ->) ->
@getInstance table, (db, collection) ->
params._id = ensureObjectId params._id if params._id?
params._id = ensureObjectId params._id if params?._id?

collection.find(params).toArray (error, results) ->
console.log 'Error with fetching documents: ' + error if error
Expand Down

0 comments on commit c8d5561

Please sign in to comment.