fix: persist a valid JSON fallback when removing bindings (#6492)

## What changed

Resetting a JSON binding stores the expression's evaluated value. If it
evaluates to `undefined`, the serialized prop loses its `value` field
and fails the build schema. This change saves `null` instead for a
nullish fallback.

## Reproduction

Using the SDK `prop` schema locally, a JSON prop with the `value` field
omitted fails validation; adding `value: null` passes.

The full test suite was not run.
This commit is contained in:
Oleg Isonen authored and GitHub committed 2026-10-02 12:42:36 +01:00
1 parent 8e4c080d95
commit c4684c141c
1 file changed
+1 -1
@@ -55,7 +55,7 @@ export const JsonControl = ({
value={computedValue}
onChangeValue={(value) => onChange({ type: "json", value })}
onChangeExpression={(value) => onChange({ type: "expression", value })}
onRemove={(value) => onChange({ type: "json", value })}
onRemove={(value) => onChange({ type: "json", value: value ?? null })}
renderControl={({ readOnly }) => (
<ExpressionEditor
color={error ? "error" : undefined}