Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,6 @@ const SubBlockRow = memo(function SubBlockRow({
workspaceId
)

const credentialId = dependencyValues.credential
const knowledgeBaseId = dependencyValues.knowledgeBaseId

const dropdownLabel = useMemo(() => {
Expand Down Expand Up @@ -576,6 +575,7 @@ const SubBlockRow = memo(function SubBlockRow({
const collectionIdValue = resolveContextValue('collectionId')
const spreadsheetIdValue = resolveContextValue('spreadsheetId')
const fileIdValue = resolveContextValue('fileId')
const credentialId = dependencyValues.credential ?? resolveContextValue('oauthCredential')

const { displayName: selectorDisplayName } = useSelectorDisplayName({
subBlock,
Expand Down
13 changes: 12 additions & 1 deletion apps/sim/lib/workflows/subblocks/visibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,18 @@ export function resolveDependencyValue(
const mode = resolveCanonicalMode(group, values, overrides)
const canonicalResult =
mode === 'advanced' ? (advancedValue ?? basicValue) : (basicValue ?? advancedValue)
return canonicalResult ?? values[dependencyKey]

if (canonicalResult != null) return canonicalResult

for (const [memberId, memberCanonicalId] of Object.entries(
canonicalIndex.canonicalIdBySubBlockId
)) {
if (memberCanonicalId === canonicalId && isNonEmptyValue(values[memberId])) {
return values[memberId]
}
}

return values[dependencyKey]
}

/**
Expand Down
Loading