Skip to content

Commit 9598b8d

Browse files
committed
Add hasModel guard before using model
1 parent 9cdacb4 commit 9598b8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/vs/workbench/browser/parts/editor/editorStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ export class ChangeEOLAction extends Action {
11281128
return this.quickInputService.pick(EOLOptions, { placeHolder: nls.localize('pickEndOfLine', "Select End of Line Sequence"), activeItem: EOLOptions[selectedIndex] }).then(eol => {
11291129
if (eol) {
11301130
const activeCodeEditor = getCodeEditor(this.editorService.activeTextEditorWidget);
1131-
if (activeCodeEditor && isWritableCodeEditor(activeCodeEditor)) {
1131+
if (activeCodeEditor && activeCodeEditor.hasModel() && isWritableCodeEditor(activeCodeEditor)) {
11321132
const textModel = activeCodeEditor.getModel();
11331133
textModel.pushEOL(eol.eol);
11341134
}

0 commit comments

Comments
 (0)