File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ const customPlugin: import("./plugin/vendor/playground").PlaygroundPlugin = {
27
27
} ,
28
28
modelChangedDebounce ( _ , model ) {
29
29
createCustomEvent ( "modelChangedDebounce" , model ) ;
30
+ } ,
31
+ willUnmount ( _ , container ) {
32
+ ReactDOM . unmountComponentAtNode ( container ) ;
30
33
}
31
34
} ;
32
35
Original file line number Diff line number Diff line change @@ -42,10 +42,11 @@ export const Provider: React.FC<ProviderProps> = ({
42
42
} , [ ] ) ;
43
43
44
44
useEffect ( ( ) => {
45
- sandbox . editor . onDidChangeModelDecorations ( ( ) => {
45
+ const disposable = sandbox . editor . onDidChangeModelDecorations ( ( ) => {
46
46
const allMarkers = sandbox . monaco . editor . getModelMarkers ( { } ) ;
47
47
setMarkers ( allMarkers ) ;
48
48
} ) ;
49
+ ( ) => disposable . dispose ( ) ;
49
50
} , [ ] ) ;
50
51
51
52
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments