# HG changeset patch # User Nicholas Jillings # Date 1461075959 -3600 # Node ID 6893f2930849f3b2ba8dc3dcec0fc4f87d9b9ec8 # Parent 30c012132427a85030fd74a106ebab687470f181 If there are no surveys it would silently fail. Now shows the get data buttons. diff -r 30c012132427 -r 6893f2930849 analysis/analysis.js --- a/analysis/analysis.js Tue Apr 19 14:58:40 2016 +0100 +++ b/analysis/analysis.js Tue Apr 19 15:25:59 2016 +0100 @@ -774,7 +774,14 @@ break; } } - for (var survey_entry of specification.preTest.options.concat(specification.postTest.options)) { + var options = []; + if(specification.preTest) { + options = options.concat(specification.preTest.options); + } + if (specification.postTest) { + options = options.concat(specification.postTest.options); + } + for (var survey_entry of options) { switch(survey_entry.type) { case "number": case "radio":