mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
util.promise: Fix promise.reject() to return a rejected promise, and fix buggy test for it
This commit is contained in:
parent
2de254acf7
commit
ef7d6ba99e
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue