Skip to content

Commit

Permalink
[FIX] Some updates were returning errors when based on queries with p…
Browse files Browse the repository at this point in the history
…osition operators (#11335)
  • Loading branch information
rodrigok committed Jul 4, 2018
1 parent ec377bd commit 64d969f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rocketchat-lib/server/models/_BaseDb.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class ModelsBaseDb extends EventEmitter {
}

updateHasPositionalOperator(update) {
return Object.keys(update).some(key => key.includes('.$') || (!Match.test(update[key], Object) && this.updateHasPositionalOperator(update[key])));
return Object.keys(update).some(key => key.includes('.$') || (Match.test(update[key], Object) && this.updateHasPositionalOperator(update[key])));
}

processOplogRecord(action) {
Expand Down

0 comments on commit 64d969f

Please sign in to comment.