Skip to content

Commit 486092d

Browse files
committed
fix: do not dispose model manually
1 parent 2fc0999 commit 486092d

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/diff.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@ class MonacoDiffEditor extends React.Component<MonacoDiffEditorProps> {
132132

133133
destroyMonaco() {
134134
if (this.diffEditor) {
135-
const { original, modified } = this.diffEditor.getModel();
136135
this.diffEditor.dispose();
137-
original.dispose();
138-
modified.dispose();
139136
this.subscription?.dispose();
140137
}
141138
}

src/editor.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ class MonacoEditor extends React.Component<MonacoEditorProps> {
156156

157157
destroyMonaco() {
158158
if (this.editor) {
159-
this.editor?.getModel()?.dispose();
160159
this.editor?.dispose();
161160
this._blurSubscription?.dispose();
162161
this._focusSubscription?.dispose();

0 commit comments

Comments
 (0)