Merge pull request #39 from bergie/patch-1

Safety: there might not be any indexes to use
This commit is contained in:
1602 2012-02-28 06:40:41 -08:00
commit 22a2b83382
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(', '),