# HG changeset patch # User Matthew Wild # Date 1540542211 -3600 # Node ID 5fa73fbb047f2d1f0df1c3f8fc943f106098f077 # Parent d7fdd418adf8bf0375eb0f85e4b00c368e84bce9 util.promise: Remove the non-standard ability to pass a promise to reject() diff -r d7fdd418adf8 -r 5fa73fbb047f util/promise.lua --- a/util/promise.lua Fri Oct 26 09:23:00 2018 +0100 +++ b/util/promise.lua Fri Oct 26 09:23:31 2018 +0100 @@ -65,9 +65,7 @@ local function _reject(e) if resolved then return; end resolved = true; - if is_promise(e) then - e:next(new_resolve_functions(p)); - elseif promise_settle(p, "rejected", next_rejected, p._pending_on_rejected, e) then + if promise_settle(p, "rejected", next_rejected, p._pending_on_rejected, e) then p.reason = e; end end