# HG changeset patch # User Nicholas Jillings # Date 1476790212 -3600 # Node ID 161d63a60b9e7bdb346c87a9e91891f9a0ae0d5b # Parent 521aa69517c44dd9840ae3f6eae336109883950c Fix for #142. Possible to submit ann empty radio survey entry. The node will be empty. diff -r 521aa69517c4 -r 161d63a60b9e js/core.js --- a/js/core.js Tue Oct 18 12:22:22 2016 +0100 +++ b/js/core.js Tue Oct 18 12:30:12 2016 +0100 @@ -3256,8 +3256,10 @@ break; case "radio": var child = this.parent.document.createElement('response'); - child.setAttribute('name', node.response.name); - child.textContent = node.response.text; + if (node.response !== null) { + child.setAttribute('name', node.response.name); + child.textContent = node.response.text; + } surveyresult.appendChild(child); break; case "checkbox":