Skip to content

Commit c7d22ba

Browse files
committed
fix: linting and conditional loop
1 parent 3cd8076 commit c7d22ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/deploy/stepFunctions/compileIamRole.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ function getTaskStates(states, stateMachineName) {
2121
case 'Map': {
2222
const mapStates = state.ItemProcessor ? state.ItemProcessor.States : state.Iterator.States;
2323
const taskStates = getTaskStates(mapStates, stateMachineName);
24-
if (state.ItemProcessor && state.ItemProcessor.ProcessorConfig.Mode === 'DISTRIBUTED') {
24+
if (state.ItemProcessor && state.ItemProcessor.ProcessorConfig
25+
&& state.ItemProcessor.ProcessorConfig.Mode === 'DISTRIBUTED') {
2526
taskStates.push({
2627
Resource: 'arn:aws:states:::states:startExecution',
2728
Mode: 'DISTRIBUTED',
2829
StateMachineName: stateMachineName,
2930
});
31+
}
3032
if (state.ItemReader) {
3133
taskStates.push(state.ItemReader);
3234
}

0 commit comments

Comments
 (0)