Test for handling statistic/close button and display of corpus statistic
Change-Id: I0980af6e9643270fa7ce315edc02d3de281dfb1a
diff --git a/dev/js/src/vc/statistic.js b/dev/js/src/vc/statistic.js
index 402fb25..a5a2f02 100644
--- a/dev/js/src/vc/statistic.js
+++ b/dev/js/src/vc/statistic.js
@@ -125,8 +125,10 @@
statisticobj = that.create(statistic);
//Removes statistic button when statistic is displayed
- var divStatButton = document.getElementById('dCorpStat');
- divStatButton.parentNode.removeChild(divStatButton);
+ if(document.getElementById('dCorpStat') !== null){
+ var divStatButton = document.getElementById('dCorpStat');
+ divStatButton.parentNode.removeChild(divStatButton);
+ }
statTable.appendChild(statisticobj.element());