derekovecs: start empty if no word was given
diff --git a/templates/index.html.ep b/templates/index.html.ep
index c5d993c..b6ed132 100644
--- a/templates/index.html.ep
+++ b/templates/index.html.ep
@@ -188,7 +188,7 @@
var collocatorData = <%= b(Mojo::JSON::to_json($collocators)) %>;
var maxHeat; // = Math.max.apply(Math,collocatorData.map(function(o){return o.cprob;}))
- if(data.mergedEnd > 0) {
+ if(typeof data !== 'undefined' && data.mergedEnd > 0) {
vocabDistanceTable = makeVocabDistanceTable("#vocabdistt", baseURL);
}