From 7c717aa7a78dc92ebe6d60102227dad6d9ec956c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=81=D1=82=D0=B0=D0=BD=D1=82=D0=B8?= =?UTF-8?q?=D0=BD=20=D0=91=D1=80=D1=8B=D0=B7=D0=B3=D0=B0=D0=BB=D0=B8=D0=BD?= Date: Tue, 12 Dec 2017 13:33:42 +0700 Subject: [PATCH] callback never gets called if lua file cannot be read --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1f50178..0958d8f 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,9 @@ function evaluateScript(redis, script_name, keys, args, callback) { } readScript(script_name, function (err, script) { - if (err) return err; + if (err) { + return callback(err) + } var sha = shaify(script); checkLoaded(redis, script_name, sha, function (err, exists) { @@ -99,4 +101,4 @@ function loadScript(redis, script_name, script, callback) { shas[script_name] = sha1 && sha1.length && sha1[0]; callback(null, sha1); }); -} \ No newline at end of file +}