1
0
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:
Wendelin
2024-12-10 11:14:15 +01:00
committed by GitHub
parent 008647aa7a
commit 8f19c0abb0
18 changed files with 773 additions and 38 deletions
+1 -1
View File
@@ -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;