We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fd8b5ac + ead97c2 commit f5bd56bCopy full SHA for f5bd56b
src/MonacoEditor.tsx
@@ -159,8 +159,11 @@ function MonacoEditor ({
159
return () => {
160
lastSaveViewState(editorRef.current!, model)
161
if (existingModel == null) {
162
- // Only dispose if we are the one that created the model
163
- model.dispose()
+ // Only dispose if we are the one who created the model
+ setTimeout(() => {
164
+ // setTimeout is required until monaco 0.34 is released (https://github.com/TypeFox/monaco-languageclient/issues/387)
165
+ model.dispose()
166
+ })
167
}
168
169
} else {
0 commit comments