From 437c0df0472716f75c404945e5b914e3cfc835b5 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Tue, 28 Feb 2012 16:22:01 +0200 Subject: [PATCH] Safety: there might not be any indexes to use --- lib/adapters/redis.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapters/redis.js b/lib/adapters/redis.js index aaf8a05a..7aca7855 100644 --- a/lib/adapters/redis.js +++ b/lib/adapters/redis.js @@ -159,7 +159,7 @@ BridgeToRedis.prototype.all = function all(model, filter, callback) { var indexes = pi[0]; var noIndexes = pi[1]; - if (indexes.length) { + if (indexes && indexes.length) { cmd = 'SINTER "' + indexes.join('" "') + '"'; if (noIndexes.length) { log(model + ': no indexes found for ', noIndexes.join(', '),