mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-28 08:04:00 +01:00
fix NPE from #40110
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user