提交 babf0b6d 编写于 作者: M Martin Aeschlimann

fix NPE from #40110

上级 db495462
......@@ -332,12 +332,15 @@ abstract class FoldingAction<T> extends EditorAction {
if (!foldingController) {
return;
}
this.reportTelemetry(accessor, editor);
return foldingController.getFoldingModel().then(foldingModel => {
if (foldingModel) {
this.invoke(foldingController, foldingModel, editor, args);
}
});
let foldingModelPromise = foldingController.getFoldingModel();
if (foldingModelPromise) {
this.reportTelemetry(accessor, editor);
return foldingModelPromise.then(foldingModel => {
if (foldingModel) {
this.invoke(foldingController, foldingModel, editor, args);
}
});
}
}
protected getSelectedLines(editor: ICodeEditor) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册