Skip to content

Commit

Permalink
allow falsy default values
Browse files Browse the repository at this point in the history
  • Loading branch information
MarconLP committed Oct 18, 2024
1 parent a147c50 commit 6ff0af5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition 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 @@ -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 6ff0af5

Please sign in to comment.