From 4af9416de549c460171e90de7f2bfa2b0d173e5d Mon Sep 17 00:00:00 2001 From: abetomo Date: Fri, 22 Dec 2017 13:45:40 +0900 Subject: [PATCH] Remove unnecessary promise chain It just returns the return value as it is. --- lib/main.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/main.js b/lib/main.js index 17e6b671..a337553a 100644 --- a/lib/main.js +++ b/lib/main.js @@ -672,9 +672,7 @@ they may not work as expected in the Lambda environment. }) } return Promise.resolve() - })).then((data) => { - return data - }) + })) } _updateScheduleEvents (scheduleEvents, functionArn, scheduleList) { @@ -836,9 +834,7 @@ they may not work as expected in the Lambda environment. program, params.FunctionName ) - ]).then((results) => { - return results - }) + ]) }) }).catch(() => { // Function does not exist @@ -868,9 +864,7 @@ they may not work as expected in the Lambda environment. program, params.FunctionName ) - ]).then((results) => { - return results - }) + ]) }) }) })