Gracefully handle missing callback to exec in ioredis

This commit is contained in:
James Allen 2017-05-05 13:36:39 +01:00
parent da85837e6f
commit 90e0b4b273
2 changed files with 3 additions and 3 deletions

View file

@ -61,8 +61,8 @@ module.exports = RedisSharelatex =
client.multi = (args...) ->
multi = _multi.call(client, args...)
_exec = multi.exec
multi.exec = (args..., callback) ->
_exec.call multi, args..., (error, result) ->
multi.exec = (callback = () ->) ->
_exec.call multi, (error, result) ->
# ioredis exec returns an results like:
# [ [null, 42], [null, "foo"] ]
# where the first entries in each 2-tuple are

View file

@ -1,6 +1,6 @@
{
"name": "redis-sharelatex",
"version": "1.0.1",
"version": "1.0.2",
"description": "Redis wrapper for node which will either use cluster, sentinal, or single instance redis",
"main": "index.js",
"author": "ShareLaTeX",