fix: globalThis.editor is undefined (#1590)

This commit is contained in:
hanchayi authored and GitHub committed 2023-03-16 03:35:37 +00:00
1 parent efcf1fcaa0
commit 1a0abbf76e
1 file changed
+2 -2
@@ -84,7 +84,7 @@ export const EditorOptionMenu = () => {
<MenuItem
onClick={() => {
// @ts-expect-error
globalThis.editor.contentParser.onExportHtml();
globalThis.currentEditor.contentParser.onExportHtml();
}}
icon={<ExportToHtmlIcon />}
iconSize={[20, 20]}
@@ -94,7 +94,7 @@ export const EditorOptionMenu = () => {
<MenuItem
onClick={() => {
// @ts-expect-error
globalThis.editor.contentParser.onExportMarkdown();
globalThis.currentEditor.contentParser.onExportMarkdown();
}}
icon={<ExportToMarkdownIcon />}
iconSize={[20, 20]}