mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix section not displayed when empty and string config (#21852)
This commit is contained in:
parent
c40751dadd
commit
216dbc4d41
@ -48,7 +48,10 @@ export class GridSection extends LitElement implements LovelaceSectionElement {
|
|||||||
private _cardConfigKeys = new WeakMap<LovelaceCardConfig, string>();
|
private _cardConfigKeys = new WeakMap<LovelaceCardConfig, string>();
|
||||||
|
|
||||||
private _getKey(cardConfig: LovelaceCardConfig) {
|
private _getKey(cardConfig: LovelaceCardConfig) {
|
||||||
if (!this._cardConfigKeys.has(cardConfig)) {
|
if (
|
||||||
|
!this._cardConfigKeys.has(cardConfig) &&
|
||||||
|
typeof cardConfig === "object"
|
||||||
|
) {
|
||||||
this._cardConfigKeys.set(cardConfig, Math.random().toString());
|
this._cardConfigKeys.set(cardConfig, Math.random().toString());
|
||||||
}
|
}
|
||||||
return this._cardConfigKeys.get(cardConfig)!;
|
return this._cardConfigKeys.get(cardConfig)!;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user