(block: BlockState, subBlock: SubBlockConfig)
| 243 | } |
| 244 | |
| 245 | function getConfigValue(block: BlockState, subBlock: SubBlockConfig): unknown { |
| 246 | const fieldValue = getSubBlockValue(block, subBlock.id) |
| 247 | |
| 248 | if ( |
| 249 | (fieldValue === null || fieldValue === undefined || fieldValue === '') && |
| 250 | subBlock.defaultValue !== undefined |
| 251 | ) { |
| 252 | return subBlock.defaultValue |
| 253 | } |
| 254 | |
| 255 | return fieldValue |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Build the persisted `webhook.providerConfig` for a trigger block at deploy time. |
no test coverage detected