File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -188,10 +188,7 @@ module.exports = {
188
188
189
189
_passStateFields ( currentState , event ) {
190
190
if ( ! currentState . ResultPath ) {
191
- if ( ! currentState . Result ) {
192
- return event ;
193
- }
194
- return currentState . Result ;
191
+ return currentState . Result || event ;
195
192
} else {
196
193
const variableName = currentState . ResultPath . split ( '$.' ) [ 1 ] ;
197
194
if ( ! currentState . Result ) {
@@ -209,9 +206,10 @@ module.exports = {
209
206
//look through choice and find appropriate
210
207
_ . forEach ( data . choice , choice => {
211
208
//check if result from previous function has of value which described in Choice
212
- if ( ! _ . isNil ( result [ choice . variable ] ) ) {
209
+ const functionResultValue = _ . get ( result , choice . variable ) ;
210
+ if ( ! _ . isNil ( functionResultValue ) ) {
213
211
//check condition
214
- const isConditionTrue = choice . checkFunction ( result [ choice . variable ] , choice . compareWithValue ) ;
212
+ const isConditionTrue = choice . checkFunction ( functionResultValue , choice . compareWithValue ) ;
215
213
if ( isConditionTrue ) {
216
214
existsAnyMatches = true ;
217
215
return this . process ( this . states [ choice . choiceFunction ] , choice . choiceFunction , result ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " serverless-step-functions-offline" ,
3
- "version" : " 2.1.1 " ,
3
+ "version" : " 2.1.2 " ,
4
4
"description" : " Serverlesss plugin to support step function offline" ,
5
5
"main" : " index.js" ,
6
6
"author" :
" viktor.kis <[email protected] >" ,
You can’t perform that action at this time.
0 commit comments