Skip to content

Commit

Permalink
refactor: remove unnecessary constructor check
Browse files Browse the repository at this point in the history
Fix #2057
  • Loading branch information
vkarpov15 committed Nov 30, 2017
1 parent a9be7dc commit f46e033
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f46e033

Please sign in to comment.