Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ export function useAccessibleReferencePrefixes(blockId?: string | null): Set<str
loopValues.forEach((loop) => {
if (!loop?.nodes) return
if (loop.nodes.includes(blockId)) {
accessibleIds.add(loop.id) // Add the loop block itself
loop.nodes.forEach((nodeId) => accessibleIds.add(nodeId))
Comment thread
waleedlatif1 marked this conversation as resolved.
accessibleIds.add(loop.id)
loop.nodes.forEach((nodeId) => {
if (ancestorIds.includes(nodeId)) {
accessibleIds.add(nodeId)
}
})
Comment thread
waleedlatif1 marked this conversation as resolved.
Outdated
Comment thread
waleedlatif1 marked this conversation as resolved.
Outdated
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
}
})

const parallelValues = Object.values(parallels as Record<string, Parallel>)
parallelValues.forEach((parallel) => {
if (!parallel?.nodes) return
if (parallel.nodes.includes(blockId)) {
accessibleIds.add(parallel.id) // Add the parallel block itself
parallel.nodes.forEach((nodeId) => accessibleIds.add(nodeId))
Comment thread
waleedlatif1 marked this conversation as resolved.
accessibleIds.add(parallel.id)
}
})
Comment thread
waleedlatif1 marked this conversation as resolved.
Outdated

Expand Down