mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
Add Query Editor null checks (#4753)
This commit is contained in:
@@ -184,11 +184,15 @@ export class TabbedPanel extends Disposable implements IThemable {
|
||||
|
||||
public removeTab(tab: PanelTabIdentifier) {
|
||||
let actualTab = this._tabMap.get(tab);
|
||||
if (actualTab.view.remove) {
|
||||
if (actualTab.view && actualTab.view.remove) {
|
||||
actualTab.view.remove();
|
||||
}
|
||||
actualTab.header.remove();
|
||||
actualTab.body.remove();
|
||||
if (actualTab.header && actualTab.header.remove) {
|
||||
actualTab.header.remove();
|
||||
}
|
||||
if (actualTab.body && actualTab.body.remove) {
|
||||
actualTab.body.remove();
|
||||
}
|
||||
dispose(actualTab.disposables);
|
||||
this._tabMap.delete(tab);
|
||||
if (this._shownTab === tab) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user