# HG changeset patch # User Nicholas Jillings # Date 1505240643 -3600 # Node ID c93687862a79c99047684248d9218149dee1b4e5 # Parent c29ef0cc741f030d39639fc1b0242f512f8bab3e# Parent 9cdcde1dafd8b10b55ea132857bf3a90bc1f70d7 Merge branch 'vnext' into Dev_main diff -r c29ef0cc741f -r c93687862a79 js/core.js --- a/js/core.js Tue Sep 12 19:07:14 2017 +0100 +++ b/js/core.js Tue Sep 12 19:24:03 2017 +0100 @@ -837,7 +837,8 @@ node.response = null; var i = 0; var inputs = optHold.getElementsByTagName('input'); - while (node.response === null) { + var checked; + while (checked === undefined) { if (i == inputs.length) { if (node.specification.mandatory === true) { interfaceContext.lightbox.post("Error", "Please select one option"); @@ -846,11 +847,18 @@ break; } if (inputs[i].checked === true) { - node.response = node.specification.options[i]; - console.log("Selected: " + node.specification.options[i].name); + checked = inputs[i]; } i++; } + var option = node.specification.options.find(function (a) { + return checked.id == a.name; + }); + if (option === undefined) { + interfaceContext.lightbox.post("Error", "A configuration error has occured, the test cannot be continued"); + throw ("ERROR - Cannot find option"); + } + node.response = option; processConditional.call(this, node, node.response.name); return true; }