Fix potential exception

This commit is contained in:
Matt Bierner
2019-02-11 16:41:41 -08:00
parent a8216d42a4
commit 8d0777697e

View File

@@ -101,7 +101,7 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha
data.selections.map(typeConverters.Selection.to),
data.options,
data.visibleRanges.map(typeConverters.Range.to),
typeConverters.ViewColumn.to(data.editorPosition)
typeof data.editorPosition === 'undefined' ? undefined : typeConverters.ViewColumn.to(data.editorPosition)
);
this._editors.set(data.id, editor);
}