Comparison

util/promise.lua @ 9546:c93496785022

util.promise: Remove debug print and assert
author Matthew Wild <mwild1@gmail.com>
date Thu, 25 Oct 2018 14:16:14 +0100
parent 9517:b1c6ede17592
child 9548:a83afc22e9d7
comparison
equal deleted inserted replaced
9545:9dc7280dd8dc 9546:c93496785022
49 end 49 end
50 local function _reject(e) 50 local function _reject(e)
51 if resolved then return; end 51 if resolved then return; end
52 resolved = true; 52 resolved = true;
53 if is_promise(e) then 53 if is_promise(e) then
54 print ("WOAH") assert(false)
55 e:next(new_resolve_functions(p)); 54 e:next(new_resolve_functions(p));
56 elseif promise_settle(p, "rejected", next_rejected, p._pending_on_rejected, e) then 55 elseif promise_settle(p, "rejected", next_rejected, p._pending_on_rejected, e) then
57 p.reason = e; 56 p.reason = e;
58 end 57 end
59 end 58 end