Skip to content

Commit

Permalink
Merge pull request #564 from prezly/fix/dev-13267-dont-use-null-as-a-…
Browse files Browse the repository at this point in the history
…possible-value-for-fallback

Provide key property as well
  • Loading branch information
kudlajz authored Aug 8, 2024
2 parents 8a453e4 + b6924ed commit ec582f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand Down

0 comments on commit ec582f5

Please sign in to comment.