From adcc9e75e86ab9af49503afc271c2292cf2c3884 Mon Sep 17 00:00:00 2001 From: Dakshesh Jain Date: Thu, 17 Aug 2023 13:59:39 +0530 Subject: [PATCH] fix: reverted my changes on a file --- .../components/tiptap/bubble-menu/index.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/app/components/tiptap/bubble-menu/index.tsx b/apps/app/components/tiptap/bubble-menu/index.tsx index 339553309..259b5ecea 100644 --- a/apps/app/components/tiptap/bubble-menu/index.tsx +++ b/apps/app/components/tiptap/bubble-menu/index.tsx @@ -19,32 +19,32 @@ export const EditorBubbleMenu: FC = (props) => { const items: BubbleMenuItem[] = [ { name: "bold", - isActive: () => props?.editor?.isActive("bold")!, - command: () => props?.editor?.chain().focus().toggleBold().run()!, + isActive: () => props.editor.isActive("bold"), + command: () => props.editor.chain().focus().toggleBold().run(), icon: BoldIcon, }, { name: "italic", - isActive: () => props?.editor?.isActive("italic")!, - command: () => props?.editor?.chain().focus().toggleItalic().run()!, + isActive: () => props.editor.isActive("italic"), + command: () => props.editor.chain().focus().toggleItalic().run(), icon: ItalicIcon, }, { name: "underline", - isActive: () => props?.editor?.isActive("underline")!, - command: () => props?.editor?.chain().focus().toggleUnderline().run()!, + isActive: () => props.editor.isActive("underline"), + command: () => props.editor.chain().focus().toggleUnderline().run(), icon: UnderlineIcon, }, { name: "strike", - isActive: () => props?.editor?.isActive("strike")!, - command: () => props?.editor?.chain().focus().toggleStrike().run()!, + isActive: () => props.editor.isActive("strike"), + command: () => props.editor.chain().focus().toggleStrike().run(), icon: StrikethroughIcon, }, { name: "code", - isActive: () => props?.editor?.isActive("code")!, - command: () => props?.editor?.chain().focus().toggleCode().run()!, + isActive: () => props.editor.isActive("code"), + command: () => props.editor.chain().focus().toggleCode().run(), icon: CodeIcon, }, ]; @@ -78,7 +78,7 @@ export const EditorBubbleMenu: FC = (props) => { className="flex w-fit divide-x divide-custom-border-300 rounded border border-custom-border-300 bg-custom-background-100 shadow-xl" > { setIsNodeSelectorOpen(!isNodeSelectorOpen); @@ -86,7 +86,7 @@ export const EditorBubbleMenu: FC = (props) => { }} /> { setIsLinkSelectorOpen(!isLinkSelectorOpen);