mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fixing execution plan not finding provider (#22238)
This commit is contained in:
@@ -33,8 +33,8 @@ export class ExecutionPlanService implements IExecutionPlanService {
|
|||||||
* @param fileExtension Execution plan file format
|
* @param fileExtension Execution plan file format
|
||||||
*/
|
*/
|
||||||
public async ensureFileExtensionHandlerRegistered(fileExtension: string): Promise<void> {
|
public async ensureFileExtensionHandlerRegistered(fileExtension: string): Promise<void> {
|
||||||
for (let providerId in Object.keys(this._capabilitiesService.providers)) {
|
for (let providerId of Object.keys(this._capabilitiesService.providers)) {
|
||||||
if (this._capabilitiesService.providers[providerId].connection.supportedExecutionPlanFileExtensions?.includes(fileExtension)) {
|
if (this._capabilitiesService.providers[providerId].connection?.supportedExecutionPlanFileExtensions?.includes(fileExtension)) {
|
||||||
// We already have a provider registered that can handle this file extension so we're done
|
// We already have a provider registered that can handle this file extension so we're done
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -43,7 +43,7 @@ export class ExecutionPlanService implements IExecutionPlanService {
|
|||||||
let listener: IDisposable;
|
let listener: IDisposable;
|
||||||
await new Promise<void>((resolve, reject) => {
|
await new Promise<void>((resolve, reject) => {
|
||||||
listener = this._capabilitiesService.onCapabilitiesRegistered(e => {
|
listener = this._capabilitiesService.onCapabilitiesRegistered(e => {
|
||||||
if (e.features.connection.supportedExecutionPlanFileExtensions?.includes(fileExtension)) {
|
if (e.features.connection?.supportedExecutionPlanFileExtensions?.includes(fileExtension)) {
|
||||||
listener.dispose();
|
listener.dispose();
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user