A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: fix error in editor with incorrect tools data
Ammar Ahmedfd183a0e1ece
diff --git a/packages/editor-mobile/src/components/tiptap.tsx b/packages/editor-mobile/src/components/tiptap.tsxindex a786a348c..af0a411ca 100644--- a/packages/editor-mobile/src/components/tiptap.tsx+++ b/packages/editor-mobile/src/components/tiptap.tsx@@ -17,11 +17,10 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/import { Editor, TiptapOptions, Toolbar, useTiptap } from "@notesnook/editor";+import { useEffect } from "react";import { useTabContext } from "../hooks/useTabStore";import { EmotionEditorToolbarTheme } from "../theme-factory";import { Settings } from "../utils";-import { useEffect } from "react";-export default function TiptapEditorWrapper(props: {options: Partial<TiptapOptions>;onEditorUpdate: (editor: Editor) => void;@@ -49,7 +48,11 @@ export default function TiptapEditorWrapper(props: {}}editor={editor}location="bottom"- tools={[...props.settings.tools]}+ tools={+ Array.isArray(props.settings.tools)+ ? [...props.settings.tools]+ : []+ }defaultFontFamily={props.settings.fontFamily}defaultFontSize={props.settings.fontSize}/>