File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1031,7 +1031,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE
1031
1031
const modifiedViewState = this . _modifiedEditor . saveViewState ( ) ;
1032
1032
return {
1033
1033
original : originalViewState ,
1034
- modified : modifiedViewState
1034
+ modified : modifiedViewState ,
1035
1035
} ;
1036
1036
}
1037
1037
Original file line number Diff line number Diff line change @@ -293,7 +293,9 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
293
293
const diffEditorState = s as IDiffEditorViewState ;
294
294
this . _editors . original . restoreViewState ( diffEditorState . original ) ;
295
295
this . _editors . modified . restoreViewState ( diffEditorState . modified ) ;
296
- this . _diffModel . get ( ) ?. restoreSerializedState ( diffEditorState . modelState as any ) ;
296
+ if ( diffEditorState . modelState ) {
297
+ this . _diffModel . get ( ) ?. restoreSerializedState ( diffEditorState . modelState as any ) ;
298
+ }
297
299
}
298
300
}
299
301
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export interface ICodeEditorViewState {
195
195
export interface IDiffEditorViewState {
196
196
original : ICodeEditorViewState | null ;
197
197
modified : ICodeEditorViewState | null ;
198
- modelState : unknown ;
198
+ modelState ? : unknown ;
199
199
}
200
200
/**
201
201
* An editor view state.
Original file line number Diff line number Diff line change @@ -2707,7 +2707,7 @@ declare namespace monaco.editor {
2707
2707
export interface IDiffEditorViewState {
2708
2708
original : ICodeEditorViewState | null ;
2709
2709
modified : ICodeEditorViewState | null ;
2710
- modelState : unknown ;
2710
+ modelState ? : unknown ;
2711
2711
}
2712
2712
2713
2713
/**
You can’t perform that action at this time.
0 commit comments