From 262ba79ddb68d1636c8c855cb61fb18d7d5f530d Mon Sep 17 00:00:00 2001 From: sunshinesmilelk <1176136681@qq.com> Date: Wed, 17 Jan 2024 15:06:56 +0800 Subject: [PATCH] fix(code-editor): fix the editor in CodeEditorView is undefined --- .changeset/purple-hats-decide.md | 32 +++++++++++++++++++ .../src/code-editor-view.tsx | 2 -- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .changeset/purple-hats-decide.md diff --git a/.changeset/purple-hats-decide.md b/.changeset/purple-hats-decide.md new file mode 100644 index 00000000..86fb0d72 --- /dev/null +++ b/.changeset/purple-hats-decide.md @@ -0,0 +1,32 @@ +--- +'@difizen/libro-cofine-editor': patch +'@difizen/libro-code-editor': patch +'@difizen/libro-jupyter': patch +'@difizen/libro-core': patch +'@difizen/libro-lab': patch +'@difizen/libro-docs': patch +'@difizen/libro-code-cell': patch +'@difizen/libro-codemirror': patch +'@difizen/libro-cofine-editor-contribution': patch +'@difizen/libro-cofine-editor-core': patch +'@difizen/libro-cofine-textmate': patch +'@difizen/libro-common': patch +'@difizen/libro-kernel': patch +'@difizen/libro-l10n': patch +'@difizen/libro-lsp': patch +'@difizen/libro-markdown': patch +'@difizen/libro-markdown-cell': patch +'@difizen/libro-output': patch +'@difizen/libro-prompt-cell': patch +'@difizen/libro-raw-cell': patch +'@difizen/libro-rendermime': patch +'@difizen/libro-search': patch +'@difizen/libro-search-code-cell': patch +'@difizen/libro-shared-model': patch +'@difizen/libro-terminal': patch +'@difizen/libro-toc': patch +'@difizen/libro-virtualized': patch +'@difizen/libro-widget': patch +--- + +1. fix the editor in CodeEditorView is undefined diff --git a/packages/libro-code-editor/src/code-editor-view.tsx b/packages/libro-code-editor/src/code-editor-view.tsx index 9c0f5a1b..bed35385 100644 --- a/packages/libro-code-editor/src/code-editor-view.tsx +++ b/packages/libro-code-editor/src/code-editor-view.tsx @@ -148,8 +148,6 @@ export class CodeEditorView extends BaseView { }; override onViewUnmount = () => { - this.editor.dispose(); - if (this.editor.dispose) { this.editor.dispose(); }