MCPcopy Index your code
hub / github.com/simstudioai/sim / getConfigValue

Function getConfigValue

apps/sim/lib/webhooks/deploy.ts:245–256  ·  view source on GitHub ↗
(block: BlockState, subBlock: SubBlockConfig)

Source from the content-addressed store, hash-verified

243}
244
245function 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.

Callers 1

buildProviderConfigFunction · 0.85

Calls 1

getSubBlockValueFunction · 0.70

Tested by

no test coverage detected