Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(dev): crash the text editor where the error reporter can see it
Elian Doranc36ea58460df
diff --git a/apps/client/src/widgets/layout/NoteActions.tsx b/apps/client/src/widgets/layout/NoteActions.tsxindex 88dc664622..a4be5f0e16 100644--- a/apps/client/src/widgets/layout/NoteActions.tsx+++ b/apps/client/src/widgets/layout/NoteActions.tsx@@ -335,11 +335,10 @@ function DevelopmentActions({ note, noteContext }: { note: FNote, noteContext?:<FormListItemicon="bx bx-error"disabled={note.type !== "text"}- onClick={() => {- noteContext?.getTextEditor(editor => {- editor.editing.view.change(() => {- throw new Error("Editor crashed.");- });+ onClick={async () => {+ const editor = await noteContext?.getTextEditor();+ editor?.editing.view.change(() => {+ throw new Error("Editor crashed.");});}}>Crash editor</FormListItem></>