mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-18 15:11:16 +00:00
Add in some null checks on comparing backend results
This commit is contained in:
parent
1c62a1c5a1
commit
6bc78ccf77
1 changed files with 2 additions and 2 deletions
|
@ -167,10 +167,10 @@ for command, key_pos of COMMANDS
|
||||||
compareResults = (results, command) ->
|
compareResults = (results, command) ->
|
||||||
return if results.length < 2
|
return if results.length < 2
|
||||||
first = results[0]
|
first = results[0]
|
||||||
if command == "smembers"
|
if command == "smembers" and first?
|
||||||
first = first.slice().sort()
|
first = first.slice().sort()
|
||||||
for result in results.slice(1)
|
for result in results.slice(1)
|
||||||
if command == "smembers"
|
if command == "smembers" and result?
|
||||||
result = result.slice().sort()
|
result = result.slice().sort()
|
||||||
if not _.isEqual(first, result)
|
if not _.isEqual(first, result)
|
||||||
logger.error results: results, "redis backend conflict"
|
logger.error results: results, "redis backend conflict"
|
||||||
|
|
Loading…
Reference in a new issue