Checking whether the custom element wasn't registered

pull/1887/head
Yuriy Kravets 7 years ago
parent c0fb21dee9
commit 873e3fc392

@ -290,7 +290,9 @@ export default function dom(
} }
}); });
if (!customElements.get(${component.tag})) {
customElements.define("${component.tag}", ${name}); customElements.define("${component.tag}", ${name});
}
`); `);
} else { } else {
builder.addBlock(deindent` builder.addBlock(deindent`

Loading…
Cancel
Save