Fix cache $ne operator

pull/5759/head
Rodrigo Nascimento 9 years ago
parent 96570e6e06
commit 6ca9b47f68
No known key found for this signature in database
GPG Key ID: 2C85B3AFE75D23F9
  1. 3
      packages/rocketchat-lib/server/models/_BaseCache.js

@ -7,6 +7,7 @@ import objectPath from 'object-path';
const logger = new Logger('BaseCache');
const lokiEq = loki.LokiOps.$eq;
const lokiNe = loki.LokiOps.$ne;
loki.LokiOps.$eq = function(a, b) {
if (Array.isArray(a)) {
@ -19,7 +20,7 @@ loki.LokiOps.$ne = function(a, b) {
if (Array.isArray(a)) {
return a.indexOf(b) === -1;
}
return lokiEq(a, b);
return lokiNe(a, b);
};
const lokiIn = loki.LokiOps.$in;

Loading…
Cancel
Save