From 23ae0bc18629443ef86545a08e7393bea37f064d Mon Sep 17 00:00:00 2001 From: Lucien Greathouse Date: Fri, 8 Dec 2017 11:34:22 -0800 Subject: [PATCH] Wrap warning earlier in Promise --- plugin/src/Promise.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/src/Promise.lua b/plugin/src/Promise.lua index 12c82344..cdcea791 100644 --- a/plugin/src/Promise.lua +++ b/plugin/src/Promise.lua @@ -242,7 +242,10 @@ function Promise:_resolve(...) if Promise.is((...)) then -- Without this warning, arguments sometimes mysteriously disappear if select("#", ...) > 1 then - local message = ("When returning a Promise from andThen, extra arguments are discarded! See:\n\n%s"):format( + local message = ( + "When returning a Promise from andThen, extra arguments are " .. + "discarded! See:\n\n%s" + ):format( self._source ) warn(message)