(block)
| 1415 | } |
| 1416 | |
| 1417 | function findLastBlockWithNextConnection (block) { |
| 1418 | let lastBlockWithNextConnection |
| 1419 | if (block.nextConnection) { |
| 1420 | lastBlockWithNextConnection = block |
| 1421 | } |
| 1422 | for (const child of block.getChildren(true)) { |
| 1423 | lastBlockWithNextConnection = findLastBlockWithNextConnection(child) || lastBlockWithNextConnection |
| 1424 | } |
| 1425 | return lastBlockWithNextConnection |
| 1426 | } |
| 1427 | |
| 1428 | module.exports.createBlockById = function ({ workspace, id, codeLanguage }) { |
| 1429 | const flyoutBlock = workspace.getToolbox()?.getFlyout()?.getWorkspace()?.getBlockById(id) |
no test coverage detected