Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
fix: remove html widget before create
Browse files Browse the repository at this point in the history
  • Loading branch information
AngryPowman committed Aug 15, 2020
1 parent e04152a commit 8516d69
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/app/scripting-handlers/html-widget-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,14 @@ export class HTMLWidgetScriptingHandler {
styles = result.text;

var shadow = HTMLWidgetManager.getShadowRoot();
var save = $(shadow)
.children()
.detach();
var save = $(shadow);

const t = save.find(`#${name}`);
if (t) {
t.remove();
}

save.children().detach();

shadow.innerHTML = `
<style id="${name}-style">
Expand Down

0 comments on commit 8516d69

Please sign in to comment.