From e9964a4dfdcd6318b5e86b9d87dae905428672b5 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Wed, 16 Dec 2020 18:25:05 -0800 Subject: [PATCH] Fix duplicate SVG rendering (#13828) --- .../workbench/contrib/notebook/browser/outputs/renderers.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }