Skip to content

Commit 76a71e0

Browse files
committed
fix(json-crdt-peritext-ui): 🐛 show back button only when necessary
1 parent 2e72e9b commit 76a71e0

File tree

1 file changed

+1
-1
lines changed
  • src/json-crdt-peritext-ui/plugins/toolbar/formatting/FormattingsManagePane

1 file changed

+1
-1
lines changed

src/json-crdt-peritext-ui/plugins/toolbar/formatting/FormattingsManagePane/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const FormattingsManagePane: React.FC<FormattingsManagePaneProps> = ({inl
2828
<context.Provider value={state}>
2929
<FormattingDisplay
3030
formatting={selected || formattings[0]}
31-
onClose={!selected ? void 0 : () => state.select(null)}
31+
onClose={!selected || (formattings.length === 1) ? void 0 : () => state.select(null)}
3232
/>
3333
</context.Provider>
3434
);

0 commit comments

Comments
 (0)