Skip to content

Commit

Permalink
fix(cdp): allow falsy default values (#25672)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarconLP authored Oct 18, 2024
1 parent e3544ca commit b9313b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ export function HogFunctionInputRenderer({ value, onChange, schema, disabled }:
)
case 'dictionary':
return <DictionaryField value={value} onChange={onChange} />

case 'boolean':
return <LemonSwitch checked={value} onChange={(checked) => onChange?.(checked)} disabled={disabled} />
case 'integration':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ describe('hogFunctionConfigurationLogic', () => {
person: '{person}',
},
},
debug: {
value: false,
},
},
enabled: true,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const templateToConfiguration = (
template.inputs_schema?.forEach((schema) => {
if (typeof subTemplate?.inputs?.[schema.key] !== 'undefined') {
inputs[schema.key] = { value: subTemplate.inputs[schema.key] }
} else if (schema.default) {
} else if (schema.default !== undefined) {
inputs[schema.key] = { value: schema.default }
}
})
Expand Down

0 comments on commit b9313b8

Please sign in to comment.