diff --git a/src/sql/parts/queryPlan/queryPlan.ts b/src/sql/parts/queryPlan/queryPlan.ts index 46ee5b1e86..8338ff6510 100644 --- a/src/sql/parts/queryPlan/queryPlan.ts +++ b/src/sql/parts/queryPlan/queryPlan.ts @@ -103,13 +103,15 @@ export class QueryPlan { public set xml(xml: string) { this._xml = xml; new Builder(this.container).empty(); - QP.showPlan(this.container, this._xml, { - jsTooltips: false - }); - (this.container.querySelectorAll('div.qp-tt')).forEach(toolTip => { - toolTip.classList.add('monaco-editor'); - toolTip.classList.add('monaco-editor-hover'); - }); + if (this.xml) { + QP.showPlan(this.container, this._xml, { + jsTooltips: false + }); + (this.container.querySelectorAll('div.qp-tt')).forEach(toolTip => { + toolTip.classList.add('monaco-editor'); + toolTip.classList.add('monaco-editor-hover'); + }); + } } public get xml(): string {