mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
util.promise: Fix missing parameters
This commit is contained in:
parent
b74a643e34
commit
e6ff6e333c
2 changed files with 30 additions and 4 deletions
|
@ -31,11 +31,11 @@ local function next_pending(self, on_fulfilled, on_rejected, resolve, reject)
|
|||
end
|
||||
|
||||
local function next_fulfilled(promise, on_fulfilled, on_rejected, resolve, reject) -- luacheck: ignore 212/on_rejected
|
||||
wrap_handler(on_fulfilled, resolve, reject)(promise.value);
|
||||
wrap_handler(on_fulfilled, resolve, reject, resolve)(promise.value);
|
||||
end
|
||||
|
||||
local function next_rejected(promise, on_fulfilled, on_rejected, resolve, reject) -- luacheck: ignore 212/on_fulfilled
|
||||
wrap_handler(on_rejected, resolve, reject)(promise.reason);
|
||||
wrap_handler(on_rejected, resolve, reject, reject)(promise.reason);
|
||||
end
|
||||
|
||||
local function promise_settle(promise, new_state, new_next, cbs, value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue