Skip to content

Commit 0194790

Browse files
committed
Fixes CI
1 parent b859bde commit 0194790

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/vs/editor/browser/widget/diffEditorWidget.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/vs/editor/common/editorCommon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ export interface ICodeEditorViewState {
195195
export interface IDiffEditorViewState {
196196
original: ICodeEditorViewState | null;
197197
modified: ICodeEditorViewState | null;
198-
modelState: unknown;
198+
modelState?: unknown;
199199
}
200200
/**
201201
* An editor view state.

src/vs/monaco.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
/**

0 commit comments

Comments
 (0)