diff --git a/core/widgetdiv.ts b/core/widgetdiv.ts index b53f7cd28..2742fa3bf 100644 --- a/core/widgetdiv.ts +++ b/core/widgetdiv.ts @@ -51,7 +51,7 @@ export function testOnly_setDiv(newDiv: HTMLDivElement | null) { * Create the widget div and inject it onto the page. */ export function createDom() { - if (containerDiv) { + if (document.querySelector('.blocklyWidgetDiv')) { return; // Already created. }