From 1a0abbf76eeb73b64eb69f15b9b11cbae3e152b6 Mon Sep 17 00:00:00 2001 From: hanchayi Date: Thu, 16 Mar 2023 11:35:37 +0800 Subject: [PATCH] fix: globalThis.editor is undefined (#1590) --- .../blocksuite/header/header-right-items/EditorOptionMenu.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/blocksuite/header/header-right-items/EditorOptionMenu.tsx b/apps/web/src/components/blocksuite/header/header-right-items/EditorOptionMenu.tsx index 872c33df4a..9a4ea6783a 100644 --- a/apps/web/src/components/blocksuite/header/header-right-items/EditorOptionMenu.tsx +++ b/apps/web/src/components/blocksuite/header/header-right-items/EditorOptionMenu.tsx @@ -84,7 +84,7 @@ export const EditorOptionMenu = () => { { // @ts-expect-error - globalThis.editor.contentParser.onExportHtml(); + globalThis.currentEditor.contentParser.onExportHtml(); }} icon={} iconSize={[20, 20]} @@ -94,7 +94,7 @@ export const EditorOptionMenu = () => { { // @ts-expect-error - globalThis.editor.contentParser.onExportMarkdown(); + globalThis.currentEditor.contentParser.onExportMarkdown(); }} icon={} iconSize={[20, 20]}