Safety: there might not be any indexes to use

This commit is contained in:
Henri Bergius 2012-02-28 16:22:01 +02:00
parent 61cad1c89e
commit 437c0df047
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ BridgeToRedis.prototype.all = function all(model, filter, callback) {
var indexes = pi[0]; var indexes = pi[0];
var noIndexes = pi[1]; var noIndexes = pi[1];
if (indexes.length) { if (indexes && indexes.length) {
cmd = 'SINTER "' + indexes.join('" "') + '"'; cmd = 'SINTER "' + indexes.join('" "') + '"';
if (noIndexes.length) { if (noIndexes.length) {
log(model + ': no indexes found for ', noIndexes.join(', '), log(model + ': no indexes found for ', noIndexes.join(', '),