Update to properly retreive stored spells
This commit is contained in:
parent
b3dbdd3280
commit
12596531a5
10
src/Place.ts
10
src/Place.ts
@ -8,13 +8,6 @@ export class Place extends LitElement {
|
||||
|
||||
@property() getCurrentSpell: any = null;
|
||||
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
const storedSpells = JSON.parse(localStorage.getItem(this.location) ?? '[]');
|
||||
this.spells = storedSpells;
|
||||
}
|
||||
|
||||
static get properties() {
|
||||
return {
|
||||
location: {
|
||||
@ -58,6 +51,9 @@ export class Place extends LitElement {
|
||||
];
|
||||
|
||||
override render() {
|
||||
const storedSpells = JSON.parse(localStorage.getItem(this.location) ?? '[]');
|
||||
this.spells = storedSpells;
|
||||
|
||||
return html`
|
||||
<div @click="${this.addSpell}">
|
||||
<h3>${this.location}</h3>
|
||||
|
Loading…
Reference in New Issue
Block a user