diff --git a/build.js b/build.js index 0741971..eed1ef7 100644 --- a/build.js +++ b/build.js @@ -23,7 +23,7 @@ module.exports = { const filePath = `${dir}/${splitHandler[0]}.js`; const handlerName = `${splitHandler[1]}`; - return { handler: handlerName, filePath }; + return {handler: handlerName, filePath}; }, buildStepWorkFlow() { @@ -75,9 +75,9 @@ module.exports = { } else if (steps[index].waitState) { //type: Wait return resolve(this._run(steps[index].f(result), result, index)); + } else { + return resolve(this._run(steps[index].f(), result, index)); } - - return resolve(this._run(steps[index].f(), result, index)); }, _runChoice(typeChoice, result, resolve, index) { @@ -86,7 +86,7 @@ module.exports = { //look through choice and find appropriate _.forEach(typeChoice.choice, choice => { //check if result from previous function has of value which described in Choice - if (!_.isEmpty(result[choice.variable])) { + if (!_.isNil(result[choice.variable])) { //check condition const isConditionTrue = choice.checkFunction(result[choice.variable], choice.compareWithValue); if (isConditionTrue) { diff --git a/package.json b/package.json index 629f4f2..5f665ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "serverless-step-functions-offline", - "version": "0.0.7", + "version": "0.0.8", "description": "Serverlesss plugin to support step function offline", "main": "index.js", "repository": {