[FIX] Some updates were returning errors when based on queries with position operators (#11335)

pull/10918/head
Rodrigo Nascimento 7 years ago committed by GitHub
parent ec377bde92
commit 64d969f4c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/rocketchat-lib/server/models/_BaseDb.js

@ -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) {

Loading…
Cancel
Save