aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-10-18 12:03:33 +0100
committerMatthew Wild <mwild1@gmail.com>2018-10-18 12:03:33 +0100
commitef7d6ba99e768d0258840f7f261d2ea31eed07f0 (patch)
tree72ea46560789eb48b9d5958042fbd30a036867ca /util
parent2de254acf7c23ae1cf17a08b437590e2199b26a8 (diff)
downloadprosody-ef7d6ba99e768d0258840f7f261d2ea31eed07f0.tar.gz
prosody-ef7d6ba99e768d0258840f7f261d2ea31eed07f0.zip
util.promise: Fix promise.reject() to return a rejected promise, and fix buggy test for it
Diffstat (limited to 'util')
-rw-r--r--util/promise.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/promise.lua b/util/promise.lua
index 7184f5fb..1f48eb9f 100644
--- a/util/promise.lua
+++ b/util/promise.lua
@@ -119,7 +119,7 @@ local function resolve(v)
end
local function reject(v)
- return new(function (_reject)
+ return new(function (_, _reject)
_reject(v);
end);
end