diff --git a/lib/query.js b/lib/query.js index d0b7b2cb57e..80e87994a57 100644 --- a/lib/query.js +++ b/lib/query.js @@ -1029,11 +1029,11 @@ Query.prototype.setOptions = function(options, overwrite) { return this; } - if (!(options && options.constructor.name === 'Object')) { + if (options == null) { return this; } - if (options && Array.isArray(options.populate)) { + if (Array.isArray(options.populate)) { var populate = options.populate; delete options.populate; var _numPopulate = populate.length;