Skip to content

Commit 615bafe

Browse files
Adam GoughAdam Gough
authored andcommitted
test
1 parent 14f753c commit 615bafe

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

apps/sim/executor/resolver/resolver.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,19 @@ export class InputResolver {
547547
// This enables direct access to <start.input> and <start.conversationId>
548548
let replacementValue: any = blockState.output
549549

550+
// If top-level access fails but nested github exists, start traversal from github
551+
if (
552+
Array.isArray(pathParts) &&
553+
pathParts.length > 0 &&
554+
replacementValue &&
555+
typeof replacementValue === 'object' &&
556+
replacementValue[pathParts[0]] === undefined &&
557+
replacementValue.github &&
558+
typeof replacementValue.github === 'object'
559+
) {
560+
replacementValue = replacementValue.github
561+
}
562+
550563
for (const part of pathParts) {
551564
if (!replacementValue || typeof replacementValue !== 'object') {
552565
logger.warn(
@@ -759,6 +772,19 @@ export class InputResolver {
759772

760773
let replacementValue: any = blockState.output
761774

775+
// If top-level access fails but nested github exists, start traversal from github
776+
if (
777+
Array.isArray(pathParts) &&
778+
pathParts.length > 0 &&
779+
replacementValue &&
780+
typeof replacementValue === 'object' &&
781+
replacementValue[pathParts[0]] === undefined &&
782+
replacementValue.github &&
783+
typeof replacementValue.github === 'object'
784+
) {
785+
replacementValue = replacementValue.github
786+
}
787+
762788
for (const part of pathParts) {
763789
if (!replacementValue || typeof replacementValue !== 'object') {
764790
throw new Error(

0 commit comments

Comments
 (0)