Fix uninitialized variable warnings in corpstat view
Change-Id: I841d9e7e08f4ee46d7ed2e1075c238affa787716
diff --git a/dev/js/src/hint/foundries/mate.js b/dev/js/src/hint/foundries/mate.js
index e022664..da13b84 100644
--- a/dev/js/src/hint/foundries/mate.js
+++ b/dev/js/src/hint/foundries/mate.js
@@ -6,7 +6,7 @@
["<root-POS>","<root-POS>","Root Part of Speech"]
);
- let ah = KorAP.annotationHelper = KorAP.annotationHelper || { "-" : [] };
+ // let ah = KorAP.annotationHelper = KorAP.annotationHelper || { "-" : [] };
ah["-"].push(
["Mate", "mate/", "Lemma, Morphology, Part-of-Speech"]
diff --git a/dev/js/src/view/vc/corpstatv.js b/dev/js/src/view/vc/corpstatv.js
index 612c295..bb7ca2c 100644
--- a/dev/js/src/view/vc/corpstatv.js
+++ b/dev/js/src/view/vc/corpstatv.js
@@ -3,17 +3,21 @@
*
* @author Helge Stallkamp
*/
+"use strict";
+
define(['view', 'vc/statistic', 'buttongroup'],
function (viewClass, statClass, buttonGroup) {
- // Localization values
+ // Localization values
const loc = KorAP.Locale;
loc.REFRESH = loc.REFRESH || 'Refresh';
return {
create : function(vc, panel) {
- return Object.create(viewClass)._init([ 'vcstatistic' ]).upgradeTo(this)
- ._init(vc, panel);
+ return Object.create(viewClass).
+ _init([ 'vcstatistic' ]).
+ upgradeTo(this).
+ _init(vc, panel);
},
_init : function(vc, panel) {
@@ -36,8 +40,7 @@
/**
* Receive Corpus statistic from the server
*/
- getStatistic : function(cb) {
- // cq = corpusQuery
+ getStatistic : function (cb) {
const vc = this.vc;
try {
@@ -54,7 +57,7 @@
// catches notifications
if (statResponse["notifications"] !== null
&& statResponse["notifications"] !== undefined) {
- notif = statResponse["notifications"];
+ const notif = statResponse["notifications"];
KorAP.log(0, notif[0][1]);
cb(null);
return;
@@ -92,8 +95,9 @@
if (statistic === null)
return;
- statisticobj = statClass.create(statistic);
- statTable.appendChild(statisticobj.element());
+ statTable.appendChild(
+ statClass.create(statistic).element()
+ );
});
return this._show = statTable;