update package version to 4.0.1

This commit is contained in:
Suren Atoyan 2021-01-18 03:01:47 +04:00
parent cc569eb5e1
commit a952d8c6ae
3 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,10 @@
### Versions
## 4.0.1
###### *Jan 18, 2021*
- Editor: dispose the current model if the Editor component is unmounted
## 4.0.0
###### *Jan 16, 2021*

View File

@ -1,6 +1,6 @@
{
"name": "@monaco-editor/react",
"version": "4.0.0",
"version": "4.0.1",
"description": "Monaco editor wrapper for easy/one-line integration with React applications (e.g. powered by create-react-app) without need of webpack configuration files",
"author": "Suren Atoyan <contact@surenatoyan.com>",
"main": "lib/cjs/index.js",

View File

@ -171,6 +171,7 @@ function Editor({
function disposeEditor() {
subscriptionRef.current?.dispose();
editorRef.current.getModel()?.dispose();
editorRef.current.dispose();
}