lux-power-distribution-card icon indicating copy to clipboard operation
lux-power-distribution-card copied to clipboard

Bug in .js file

Open brickatius opened this issue 1 year ago • 2 comments

There is a bug in the lux-power-distribution-card.js file which causes this: Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry at....... This is caused by line 433: customElements.define("lux-power-distribution-card", LuxPowerDistributionCard); As a result, after clearing the browser history (tested on Safari and Firefox) the above error is thrown and the card is not rendered properly - just shows the .yaml entry and a message about needing to define the first entity. I found that replacing line 433 with the following solves the issue. = Object.assign(Object.create(Object.getPrototypeOf(customElements)).define, customElements); customElements.define = (name, element) => customElements.get(name) || customElements.defineclone(name, element);

brickatius avatar Sep 22 '23 11:09 brickatius