Commit 94e4ac0
committed
fix: use omit() to properly remove conditionals from ReadActionConfig
The .extend() method in Zod merges fields rather than replacing them.
When ActionConfigBase has conditionals defined, extending with conditionals: z.never()
creates a conflict. Using .omit({conditionals: true}) first removes the field completely,
then .extend() adds only the fields we want without the conditionals field.
This ensures READ actions truly cannot have conditionals, fixing the validation error:
'expected never, received array' at path actions[0].conditionals1 parent ff488b3 commit 94e4ac0
File tree
2 files changed
+3
-7
lines changed- packages/commons/src
- conditionals
- events
2 files changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
| 290 | + | |
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 60 | + | |
65 | 61 | | |
66 | 62 | | |
67 | 63 | | |
| |||
0 commit comments