Remove last case of manual

This commit is contained in:
Lucien Greathouse 2018-09-14 13:41:32 -07:00
parent bb68da5e5b
commit 7921abb625

View file

@ -338,12 +338,10 @@ function Promise:_resolve(...)
return return
end end
local argLength = select("#", ...)
-- If the resolved value was a Promise, we chain onto it! -- If the resolved value was a Promise, we chain onto it!
if Promise.is((...)) then if Promise.is((...)) then
-- Without this warning, arguments sometimes mysteriously disappear -- Without this warning, arguments sometimes mysteriously disappear
if argLength > 1 then if select("#", ...) > 1 then
local message = ( local message = (
"When returning a Promise from andThen, extra arguments are " .. "When returning a Promise from andThen, extra arguments are " ..
"discarded! See:\n\n%s" "discarded! See:\n\n%s"
@ -366,8 +364,7 @@ function Promise:_resolve(...)
end end
self._status = Promise.Status.Resolved self._status = Promise.Status.Resolved
self._values = {...} self._valuesLength, self._values = pack(...)
self._valuesLength = argLength
-- We assume that these callbacks will not throw errors. -- We assume that these callbacks will not throw errors.
for _, callback in ipairs(self._queuedResolve) do for _, callback in ipairs(self._queuedResolve) do