1
0
mirror of https://github.com/Ale32bit-CC/Node.lua synced 2024-06-18 03:09:58 +00:00

Changed promise.success to promise.bind

This commit is contained in:
Alessandro 2019-01-28 17:21:22 +01:00 committed by GitHub
parent 1bf6f7d525
commit 3869ced4ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,7 +192,7 @@ local function promise(func, errorOnUncaught) -- errorOnUncaught is temporary
promise.status = "pending" -- "resolved", "rejected"
promise.value = nil
promise.success = function(func)
promise.bind = function(func)
assert(type(func) == "function", "bad argument (expected function, got ".. type(func) ..")")
promise.__then = func
end