diff --git a/src/sql/workbench/contrib/notebook/browser/outputs/renderers.ts b/src/sql/workbench/contrib/notebook/browser/outputs/renderers.ts index f7d7c1ec86..867787fe83 100644 --- a/src/sql/workbench/contrib/notebook/browser/outputs/renderers.ts +++ b/src/sql/workbench/contrib/notebook/browser/outputs/renderers.ts @@ -325,9 +325,11 @@ export function renderSVG(options: renderSVG.IRenderOptions): Promise { // Unpack the options. let { host, source, trusted, unconfined } = options; + // Clear the content in the host. + host.textContent = ''; + // Clear the content if there is no source. if (!source) { - host.textContent = ''; return Promise.resolve(undefined); }