aboutsummaryrefslogtreecommitdiff
path: root/src/manage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/manage.js')
-rw-r--r--src/manage.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/manage.js b/src/manage.js
index f8fe220..6ed58bd 100644
--- a/src/manage.js
+++ b/src/manage.js
@@ -38,7 +38,7 @@ export class Manager {
return i.render();
})
.join("");
- let elementId = this.data[0].description + "_list";
+ let elementId = this.data[0].description + "-list";
document.getElementById(elementId).innerHTML = renderedHTML;
this.addBehaviour();
}
@@ -111,12 +111,14 @@ export class GuestManager extends Manager {
active() {
return normalize(super.active());
}
- update(list) {
+ incrementGames(list) {
for (let index = 0; index < this.data.length; index++ ){
- if (this.data[index].name in list) {
+ if (list.includes(this.data[index].name)) {
+ console.log("Added game count to " + this.data[index].name);
this.data[index].games += 1;
}
}
+ this.store();
}
}