Skip to content

Commit 1a90c04

Browse files
committed
fix
1 parent 5b3cc2b commit 1a90c04

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

apps/sim/executor/utils/start-block.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,25 @@ function buildIntegrationTriggerOutput(
383383
structuredInput: Record<string, unknown>,
384384
hasStructured: boolean
385385
): NormalizedBlockOutput {
386+
const output: NormalizedBlockOutput = {}
387+
386388
if (hasStructured) {
387-
return { ...structuredInput }
389+
for (const [key, value] of Object.entries(structuredInput)) {
390+
output[key] = value
391+
}
388392
}
389-
return isPlainObject(workflowInput) ? (workflowInput as NormalizedBlockOutput) : {}
393+
394+
if (isPlainObject(workflowInput)) {
395+
for (const [key, value] of Object.entries(workflowInput)) {
396+
if (value !== undefined && value !== null) {
397+
output[key] = value
398+
} else if (!Object.hasOwn(output, key)) {
399+
output[key] = value
400+
}
401+
}
402+
}
403+
404+
return mergeFilesIntoOutput(output, workflowInput)
390405
}
391406

392407
function extractSubBlocks(block: SerializedBlock): Record<string, unknown> | undefined {

0 commit comments

Comments
 (0)