thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.05k stars 169 forks source link

mod-card MAY cause an error "i.setConfig is not a function" #323

Closed ildar170975 closed 6 months ago

ildar170975 commented 6 months ago

2023.12.1 card-mod 3.3.1 Chrome 120.0.6099.129 , Win10x64.

Right after updating to 3.3.1 these errors starting erratically occur. They are observed for mod-card.

image

type: custom:mod-card
card:
  type: vertical-stack
  title: title
  cards:
    - type: entity
      entity: sun.sun
    - type: entity
      entity: sun.sun

Sometimes a browser's refresh helps. In most cases I see these errors after clearing a browser's cache.

Error messages from the browser console:

card-mod.js:1 Uncaught TypeError: Illegal constructor
    at new n (card-mod.js:1:10144)
    at o.<anonymous> (card-mod.js:1:9380)
    at new r (card-mod.js:1:15236)
    at o.<anonymous> (card-mod.js:1:9380)
    at new n (card-mod.js:1:32733)
    at o.<anonymous> (card-mod.js:1:9380)
    at new o (card-mod.js:1:45566)
    at C (scoped-custom-element-registry.js:388:7)
    at new t (scoped-custom-element-registry.js:236:11)
    at card-mod.js:1:39893

By putting an X in the boxes ([]) below, I indicate that I:

tbrasser commented 6 months ago

Also seeing this, and indeed not persistent. (If I don't reply again it only showed up once)

thomasloven commented 6 months ago

See #326. Thanks for pointing out it happened for mod-card. I'd have missed that otherwise.