Skip to content

Commit 6e78df7

Browse files
committed
fix edit workflow
1 parent df8dd05 commit 6e78df7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/sim/lib/copilot/tools/server/workflow/edit-workflow.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2499,7 +2499,9 @@ export const editWorkflowServerTool: BaseServerTool<EditWorkflowParams, any> = {
24992499
async execute(params: EditWorkflowParams, context?: { userId: string }): Promise<any> {
25002500
const logger = createLogger('EditWorkflowServerTool')
25012501
const { operations, workflowId, currentUserWorkflow } = params
2502-
if (!operations || operations.length === 0) throw new Error('operations are required')
2502+
if (!Array.isArray(operations) || operations.length === 0) {
2503+
throw new Error('operations are required and must be an array')
2504+
}
25032505
if (!workflowId) throw new Error('workflowId is required')
25042506

25052507
logger.info('Executing edit_workflow', {

0 commit comments

Comments
 (0)