aboutsummaryrefslogtreecommitdiffstats
path: root/util/promise.lua
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
commit08adc56f45fdebd59f7676cfeb788d09543e1c9e (patch)
tree72ea46560789eb48b9d5958042fbd30a036867ca /util/promise.lua
parent4e79f05c854857d4ddf0baeba0a4b25a65bd650c (diff)
downloadprosody-08adc56f45fdebd59f7676cfeb788d09543e1c9e.tar.gz
prosody-08adc56f45fdebd59f7676cfeb788d09543e1c9e.zip
util.promise: Fix promise.reject() to return a rejected promise, and fix buggy test for it
Diffstat (limited to 'util/promise.lua')
-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