mirror of
https://github.com/home-assistant/frontend.git
synced 2026-05-08 09:18:34 +01:00
Use localStorage with Web Storage API (#23172)
This commit is contained in:
@@ -26,7 +26,7 @@ export class HADemoCard extends LitElement implements LovelaceCard {
|
||||
|
||||
@state() private _switching = false;
|
||||
|
||||
private _hidden = localStorage.hide_demo_card;
|
||||
private _hidden = window.localStorage.getItem("hide_demo_card");
|
||||
|
||||
public getCardSize() {
|
||||
return this._hidden ? 0 : 2;
|
||||
|
||||
Reference in New Issue
Block a user