mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 09:35:36 -05:00
Fix Notebook Kusto Kernel Consistency (#12256)
* fix kusto notebook consistency * Address undefined
This commit is contained in:
@@ -653,9 +653,12 @@ export class NotebookModel extends Disposable implements INotebookModel {
|
||||
let standardKernels = find(this._standardKernels, kernel => this._defaultKernel && kernel.displayName === this._defaultKernel.display_name);
|
||||
let connectionProviderIds = standardKernels ? standardKernels.connectionProviderIds : undefined;
|
||||
let providerFeatures = this._capabilitiesService.getCapabilities(profile.providerName);
|
||||
if (connectionProviderIds.length > 0 && this._currentKernelAlias) {
|
||||
if (connectionProviderIds?.length) {
|
||||
this._currentKernelAlias = providerFeatures?.connection.notebookKernelAlias;
|
||||
this._kernelDisplayNameToConnectionProviderIds.set(this._currentKernelAlias, [profile.providerName]);
|
||||
// Adds Kernel Alias and Connection Provider to Map if new Notebook connection contains notebookKernelAlias
|
||||
if (this._currentKernelAlias) {
|
||||
this._kernelDisplayNameToConnectionProviderIds.set(this._currentKernelAlias, [profile.providerName]);
|
||||
}
|
||||
}
|
||||
return this._currentKernelAlias || profile && connectionProviderIds && find(connectionProviderIds, provider => provider === profile.providerName) !== undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user