mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -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) {
|
public removeTab(tab: PanelTabIdentifier) {
|
||||||
let actualTab = this._tabMap.get(tab);
|
let actualTab = this._tabMap.get(tab);
|
||||||
if (actualTab.view.remove) {
|
if (actualTab.view && actualTab.view.remove) {
|
||||||
actualTab.view.remove();
|
actualTab.view.remove();
|
||||||
}
|
}
|
||||||
|
if (actualTab.header && actualTab.header.remove) {
|
||||||
actualTab.header.remove();
|
actualTab.header.remove();
|
||||||
|
}
|
||||||
|
if (actualTab.body && actualTab.body.remove) {
|
||||||
actualTab.body.remove();
|
actualTab.body.remove();
|
||||||
|
}
|
||||||
dispose(actualTab.disposables);
|
dispose(actualTab.disposables);
|
||||||
this._tabMap.delete(tab);
|
this._tabMap.delete(tab);
|
||||||
if (this._shownTab === tab) {
|
if (this._shownTab === tab) {
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ export class ExtHostQueryEditor implements ExtHostQueryEditorShape {
|
|||||||
public $onQueryEvent(handle: number, fileUri:string, event: IQueryEvent): void {
|
public $onQueryEvent(handle: number, fileUri:string, event: IQueryEvent): void {
|
||||||
let listener: azdata.queryeditor.QueryEventListener = this._queryListeners[handle];
|
let listener: azdata.queryeditor.QueryEventListener = this._queryListeners[handle];
|
||||||
if (listener) {
|
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