Skip to content

Commit

Permalink
Fixed bug when event payload and inputs are defined simultaneously
Browse files Browse the repository at this point in the history
  • Loading branch information
im-sampm-demo authored and im-sampm committed Jan 6, 2024
1 parent f8c8250 commit 09340a4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/action-input/action-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ export class ActionInput {
toActArguments() {
if (Object.keys(this.event.event).length > 0) {
const eventCopy = { ...this.event.event };
eventCopy.inputs = Object.fromEntries(this.input.map);
// Merge inputs with existing event entries
eventCopy.inputs = {
...(eventCopy.inputs || {}),
...Object.fromEntries(this.input.map)
};
this.event.event = eventCopy;
return [];
} else {
return this.input.toActArguments();
}
}
}
}

0 comments on commit 09340a4

Please sign in to comment.