提交 25c0fb7f 编写于 作者: M Matt Bierner

Fix _getViewIndexUpperBound throwing if the view model is undefined

Return -1 instead, which the callers check
上级 03b6a2e6
......@@ -534,7 +534,11 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
private _getViewIndexUpperBound(cell: ICellViewModel): number {
const modelIndex = this._viewModel!.getCellIndex(cell);
if (!this._viewModel) {
return -1;
}
const modelIndex = this._viewModel.getCellIndex(cell);
if (!this.hiddenRangesPrefixSum) {
return modelIndex;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册