Skip to content

Commit cdf9f85

Browse files
authored
fix: cannot update for each step name if no variable (#1346)
## Problem Cannot update step name if there is no variable selected at the for each step. <img width="1506" height="804" alt="Screenshot 2025-11-27 at 5 36 03 PM" src="https://github.com/user-attachments/assets/a50cb3b1-4074-4c42-bf77-dc9ebc5e5368" /> ## Solution Update schema with `.nullish()` to allow step name to be updated before any for each variable is selected ## Test - [ ] Can update step name before a variable is selected in the or each input - [ ] Validation that input must be a variable still works
1 parent 8030d34 commit cdf9f85

File tree

1 file changed

+3
-1
lines changed
  • packages/backend/src/apps/toolbox/actions/for-each

1 file changed

+3
-1
lines changed

packages/backend/src/apps/toolbox/actions/for-each/schema.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,7 @@ export const parameterSchema = z.object({
147147
})
148148
.refine((v) => VARIABLE_REGEX.test(v), {
149149
message: PARAMETER_ERROR_MESSAGE,
150-
}),
150+
})
151+
// could be null when user is updating the step name before selecting a variable
152+
.nullish(),
151153
})

0 commit comments

Comments
 (0)