File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 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 = {
2727 } ,
2828 modelChangedDebounce ( _ , model ) {
2929 createCustomEvent ( "modelChangedDebounce" , model ) ;
30+ } ,
31+ willUnmount ( _ , container ) {
32+ ReactDOM . unmountComponentAtNode ( container ) ;
3033 }
3134} ;
3235
Original file line number Diff line number Diff line change @@ -42,10 +42,11 @@ export const Provider: React.FC<ProviderProps> = ({
4242 } , [ ] ) ;
4343
4444 useEffect ( ( ) => {
45- sandbox . editor . onDidChangeModelDecorations ( ( ) => {
45+ const disposable = sandbox . editor . onDidChangeModelDecorations ( ( ) => {
4646 const allMarkers = sandbox . monaco . editor . getModelMarkers ( { } ) ;
4747 setMarkers ( allMarkers ) ;
4848 } ) ;
49+ ( ) => disposable . dispose ( ) ;
4950 } , [ ] ) ;
5051
5152 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments