Fix duplicate SVG rendering (#13828)

This commit is contained in:
Chris LaFreniere
2020-12-16 18:25:05 -08:00
committed by GitHub
parent 598aaed500
commit e9964a4dfd

View File

@@ -325,9 +325,11 @@ export function renderSVG(options: renderSVG.IRenderOptions): Promise<void> {
// 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);
}