Skip to content

Commit

Permalink
Dedupe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Oct 11, 2019
1 parent 399ce01 commit 4c92efb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dist/weather-card-editor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
const _customElementsDefine = window.customElements.define;
window.customElements.define = (name, cl, conf) => {
if (!customElements.get(name)) {
_customElementsDefine.call(window.customElements, name, cl, conf);
} else {
console.warn(`${name} has been defined twice`);
}
};

if (!customElements.get("paper-input")) {
console.log("imported", "paper-input");
import("https://unpkg.com/@polymer/paper-input/paper-input.js?module");
Expand Down

0 comments on commit 4c92efb

Please sign in to comment.