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
10311031 const modifiedViewState = this . _modifiedEditor . saveViewState ( ) ;
10321032 return {
10331033 original : originalViewState ,
1034- modified : modifiedViewState
1034+ modified : modifiedViewState ,
10351035 } ;
10361036 }
10371037
Original file line number Diff line number Diff line change @@ -293,7 +293,9 @@ export class DiffEditorWidget2 extends DelegatingEditor implements IDiffEditor {
293293 const diffEditorState = s as IDiffEditorViewState ;
294294 this . _editors . original . restoreViewState ( diffEditorState . original ) ;
295295 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+ }
297299 }
298300 }
299301
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export interface ICodeEditorViewState {
195195export interface IDiffEditorViewState {
196196 original : ICodeEditorViewState | null ;
197197 modified : ICodeEditorViewState | null ;
198- modelState : unknown ;
198+ modelState ? : unknown ;
199199}
200200/**
201201 * An editor view state.
Original file line number Diff line number Diff line change @@ -2707,7 +2707,7 @@ declare namespace monaco.editor {
27072707 export interface IDiffEditorViewState {
27082708 original : ICodeEditorViewState | null ;
27092709 modified : ICodeEditorViewState | null ;
2710- modelState : unknown ;
2710+ modelState ? : unknown ;
27112711 }
27122712
27132713 /**
You can’t perform that action at this time.
0 commit comments