mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
fix: globalThis.editor is undefined (#1590)
This commit is contained in:
@@ -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]}
|
||||
|
||||
Reference in New Issue
Block a user