(block?: WorkflowLockBlock)
| 89 | * Reads a workflow block's parent ID from runtime block data. |
| 90 | */ |
| 91 | export function getWorkflowBlockParentId(block?: WorkflowLockBlock): string | undefined { |
| 92 | const data = block?.data |
| 93 | if (typeof data !== 'object' || data === null || !('parentId' in data)) return undefined |
| 94 | |
| 95 | const parentId = (data as Record<string, unknown>).parentId |
| 96 | return typeof parentId === 'string' && parentId.length > 0 ? parentId : undefined |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Checks whether any parent container in a block's ancestry is locked. |
no outgoing calls
no test coverage detected