From 84c86c81e725788627cde6a898b55c50adb1ba65 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch <p.jentsch@uni-bielefeld.de>
Date: Thu, 14 Jan 2021 15:18:50 +0100
Subject: [PATCH] Make the corpus analysis runnable again

---
 web/app/static/js/modules/corpus_analysis/client/Client.js | 4 ++--
 web/app/templates/corpora/analyse_corpus.html.j2           | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/web/app/static/js/modules/corpus_analysis/client/Client.js b/web/app/static/js/modules/corpus_analysis/client/Client.js
index 6d8a54e3..08c380ac 100644
--- a/web/app/static/js/modules/corpus_analysis/client/Client.js
+++ b/web/app/static/js/modules/corpus_analysis/client/Client.js
@@ -136,7 +136,7 @@ class Client {
       tmp_first_cpos.push(results.data.matches[dataIndex].c[0]);
       tmp_last_cpos.push(results.data.matches[dataIndex].c[1]);
     }
-    nopaque.socket.emit('corpus_analysis_get_match_with_full_context',
+    this.socket.emit('corpus_analysis_get_match_with_full_context',
                         {type: resultsType,
                          data_indexes: dataIndexes,
                          first_cpos: tmp_first_cpos,
@@ -279,4 +279,4 @@ export {
   Client,
   ClientEventListener,
   ListenerCallback,
-};
\ No newline at end of file
+};
diff --git a/web/app/templates/corpora/analyse_corpus.html.j2 b/web/app/templates/corpora/analyse_corpus.html.j2
index af44f86f..1a4659f4 100644
--- a/web/app/templates/corpora/analyse_corpus.html.j2
+++ b/web/app/templates/corpora/analyse_corpus.html.j2
@@ -157,7 +157,7 @@ document.addEventListener("DOMContentLoaded", () => {
   // Initialize the client for server client communication in dynamic mode
   let corpusId = {{ corpus.id }}
   const client = new Client({'corpusId': corpusId,
-                             'socket': nopaque.socket,
+                             'socket': nopaque.appClient.socket,
                              'logging': true,
                              'dynamicMode': true});
   /**
-- 
GitLab