Skip to content

Commit 48aef08

Browse files
committed
fix issues from bugbot
1 parent 5949640 commit 48aef08

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/backend/src/apps/toolbox/common/get-for-each-variables.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { FOR_EACH_INPUT_SOURCE, FOR_EACH_ITERATION_KEY } from './constants'
1+
import {
2+
FOR_EACH_INPUT_SOURCE,
3+
FOR_EACH_ITERATION_KEY,
4+
} from '@/apps/toolbox/common/constants'
25

36
type InputSource = FOR_EACH_INPUT_SOURCE | null
47

packages/backend/src/services/action.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const processAction = async (options: ProcessActionOptions) => {
9393

9494
const { forEachStepIndex, stepPositions, lastStepId, isForEachStep } =
9595
getForEachContext(flow, step)
96-
if (!testRun && forEachStepIndex > -1 && lastStepId === stepId) {
96+
if (!testRun && forEachStepIndex > -1 && lastStepId === stepId && metadata) {
9797
metadata.isLastStep = true
9898
}
9999

@@ -181,7 +181,8 @@ export const processAction = async (options: ProcessActionOptions) => {
181181
if (
182182
!testRun &&
183183
forEachStepIndex > -1 &&
184-
runResult.nextStep?.command === 'stop-execution'
184+
runResult.nextStep?.command === 'stop-execution' &&
185+
metadata
185186
) {
186187
metadata.isLastStep = true
187188
}

0 commit comments

Comments
 (0)