mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 15:50:01 +00:00
Remove last case of manual
This commit is contained in:
parent
bb68da5e5b
commit
7921abb625
1 changed files with 2 additions and 5 deletions
|
@ -338,12 +338,10 @@ function Promise:_resolve(...)
|
|||
return
|
||||
end
|
||||
|
||||
local argLength = select("#", ...)
|
||||
|
||||
-- If the resolved value was a Promise, we chain onto it!
|
||||
if Promise.is((...)) then
|
||||
-- Without this warning, arguments sometimes mysteriously disappear
|
||||
if argLength > 1 then
|
||||
if select("#", ...) > 1 then
|
||||
local message = (
|
||||
"When returning a Promise from andThen, extra arguments are " ..
|
||||
"discarded! See:\n\n%s"
|
||||
|
@ -366,8 +364,7 @@ function Promise:_resolve(...)
|
|||
end
|
||||
|
||||
self._status = Promise.Status.Resolved
|
||||
self._values = {...}
|
||||
self._valuesLength = argLength
|
||||
self._valuesLength, self._values = pack(...)
|
||||
|
||||
-- We assume that these callbacks will not throw errors.
|
||||
for _, callback in ipairs(self._queuedResolve) do
|
||||
|
|
Loading…
Reference in a new issue