From 90b256a19dbf96d6b3af5252c3df158c0a619b3f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 18 Oct 2018 12:03:33 +0100 Subject: util.promise: Fix promise.reject() to return a rejected promise, and fix buggy test for it --- util/promise.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/promise.lua b/util/promise.lua index 7184f5fb..1f48eb9f 100644 --- a/util/promise.lua +++ b/util/promise.lua @@ -119,7 +119,7 @@ local function resolve(v) end local function reject(v) - return new(function (_reject) + return new(function (_, _reject) _reject(v); end); end -- cgit v1.2.3