From 6bc78ccf77d2ba8bf9cea6e4cd1488c91c5cc955 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 7 Jul 2016 11:24:33 +0100 Subject: [PATCH] Add in some null checks on comparing backend results --- services/document-updater/app/coffee/RedisBackend.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/document-updater/app/coffee/RedisBackend.coffee b/services/document-updater/app/coffee/RedisBackend.coffee index 649086ba09..f4c910a2df 100644 --- a/services/document-updater/app/coffee/RedisBackend.coffee +++ b/services/document-updater/app/coffee/RedisBackend.coffee @@ -167,10 +167,10 @@ for command, key_pos of COMMANDS compareResults = (results, command) -> return if results.length < 2 first = results[0] - if command == "smembers" + if command == "smembers" and first? first = first.slice().sort() for result in results.slice(1) - if command == "smembers" + if command == "smembers" and result? result = result.slice().sort() if not _.isEqual(first, result) logger.error results: results, "redis backend conflict"