diff --git a/src/mantine-tiptap/src/controls/ColorPickerControl/ColorPickerControl.tsx b/src/mantine-tiptap/src/controls/ColorPickerControl/ColorPickerControl.tsx index 53436f2e2fd..999a64d6ec4 100644 --- a/src/mantine-tiptap/src/controls/ColorPickerControl/ColorPickerControl.tsx +++ b/src/mantine-tiptap/src/controls/ColorPickerControl/ColorPickerControl.tsx @@ -46,9 +46,8 @@ export const ColorPickerControl = forwardRef('palette'); const theme = useMantineTheme(); const currentColor = - editor?.getAttributes('textStyle').color || theme.colorScheme === 'dark' - ? theme.colors.dark[1] - : theme.black; + editor?.getAttributes('textStyle').color || + (theme.colorScheme === 'dark' ? theme.colors.dark[1] : theme.black); const handleChange = (value: string, shouldClose = true) => { (editor.chain() as any).focus().setColor(value).run();