Add Query Editor null checks (#4753)

This commit is contained in:
Karl Burtram
2019-03-28 15:18:44 -07:00
committed by GitHub
parent fdb471d506
commit 7eb17f6abc
2 changed files with 9 additions and 4 deletions

View File

@@ -60,7 +60,8 @@ export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
public $onQueryEvent(handle: number, fileUri:string, event: IQueryEvent): void {
let listener: azdata.queryeditor.QueryEventListener = this._queryListeners[handle];
if (listener) {
listener.onQueryEvent(event.type, new ExtHostQueryDocument('MSSQL', fileUri, this._proxy), event.params.planXml);
let planXml = event.params ? event.params.planXml : undefined;
listener.onQueryEvent(event.type, new ExtHostQueryDocument('MSSQL', fileUri, this._proxy), planXml);
}
}
}