mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 23:50:03 +00:00
Make Promise.promisify use Promise.new
This commit is contained in:
parent
783eb1c2bb
commit
5541559c78
1 changed files with 1 additions and 1 deletions
|
@ -338,7 +338,7 @@ end
|
||||||
function Promise.promisify(callback, selfValue)
|
function Promise.promisify(callback, selfValue)
|
||||||
return function(...)
|
return function(...)
|
||||||
local length, values = pack(...)
|
local length, values = pack(...)
|
||||||
return Promise.async(function(resolve)
|
return Promise.new(function(resolve)
|
||||||
if selfValue == nil then
|
if selfValue == nil then
|
||||||
resolve(callback(unpack(values, 1, length)))
|
resolve(callback(unpack(values, 1, length)))
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue