Skip to content

Commit

Permalink
Hide settings menu if there's only one option without a fallback support
Browse files Browse the repository at this point in the history
  • Loading branch information
kudlajz committed Aug 9, 2024
1 parent c79de94 commit 60473ed
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export function VariableMenu({ container, element, onClose, variables }: Props)
removeVariable(editor);
}

if (options.length < 2 && !option?.withFallback) {
return null;
}

return (
<Menu
popperOptions={{ ...popperOptions, modifiers: { arrow: { padding: 0 } } }}
Expand Down

0 comments on commit 60473ed

Please sign in to comment.