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
1 changed files with 1 additions and 1 deletions

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