From 4c92efb673a575d8822834284b0326ff6bdb5bbc Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 11 Oct 2019 18:15:50 +0200 Subject: [PATCH] Dedupe fix --- dist/weather-card-editor.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dist/weather-card-editor.js b/dist/weather-card-editor.js index 73cab7a9..94301849 100644 --- a/dist/weather-card-editor.js +++ b/dist/weather-card-editor.js @@ -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");