diff --git a/packages/slate-editor/src/extensions/variables/VariableMenu.tsx b/packages/slate-editor/src/extensions/variables/VariableMenu.tsx index e35399339..37f3ca341 100644 --- a/packages/slate-editor/src/extensions/variables/VariableMenu.tsx +++ b/packages/slate-editor/src/extensions/variables/VariableMenu.tsx @@ -37,7 +37,7 @@ export function VariableMenu({ container, element, onClose, variables }: Props) function handleChangeType(newType: string) { const newOption = options.find(({ value }) => value === newType); if (newOption && !newOption.withFallback) { - updateVariable(editor, { fallback: '' }); + updateVariable(editor, { key: newType, fallback: '' }); } else { updateVariable(editor, { key: newType }); }