diff --git a/app/static/js/CorpusList.js b/app/static/js/CorpusList.js index 8687b8d4..dc8fdfa4 100644 --- a/app/static/js/CorpusList.js +++ b/app/static/js/CorpusList.js @@ -1,11 +1,11 @@ class CorpusList extends List { - constructor(idOrElement, options) { + constructor(idOrElement, subscriberList, options) { super(idOrElement, options); - corporaSubscribers.push(this); + subscriberList.push(this); } - _init() { + _init(corpora) { for (let [id, corpus] of Object.entries(corpora)) { this.addCorpus(corpus); } diff --git a/app/templates/base.html.j2 b/app/templates/base.html.j2 index 2912c40d..ec519865 100644 --- a/app/templates/base.html.j2 +++ b/app/templates/base.html.j2 @@ -31,7 +31,7 @@ var subscriber; corpora = JSON.parse(msg); - for (subscriber of corporaSubscribers) {subscriber._init();} + for (subscriber of corporaSubscribers) {subscriber._init(corpora);} }); diff --git a/app/templates/main/dashboard.html.j2 b/app/templates/main/dashboard.html.j2 index 51938fb5..036384d2 100644 --- a/app/templates/main/dashboard.html.j2 +++ b/app/templates/main/dashboard.html.j2 @@ -31,7 +31,7 @@