Fix #3875 Notebook stuck Loading Kernels if SQL flag disabled and Jupyter not installed (#3876)

This commit is contained in:
Kevin Cunnane
2019-02-01 10:10:21 -08:00
committed by GitHub
parent afb6e6b5ba
commit 9504ede1f3
3 changed files with 10 additions and 4 deletions

View File

@@ -93,7 +93,13 @@ export class NotebookModel extends Disposable implements INotebookModel {
}
public get notebookManager(): INotebookManager {
return this.notebookManagers.find(manager => manager.providerId === this._providerId);
let manager = this.notebookManagers.find(manager => manager.providerId === this._providerId);
if (!manager) {
// Note: this seems like a less than ideal scenario. We should ideally pass in the "correct" provider ID and allow there to be a default,
// instead of assuming in the NotebookModel constructor that the option is either SQL or Jupyter
manager = this.notebookManagers.find(manager => manager.providerId === DEFAULT_NOTEBOOK_PROVIDER);
}
return manager;
}
public get notebookUri(): URI {