Commit 80f90e37 by Braden MacDonald

Merge pull request #48 from open-craft/hgse-bugs-ii

Fix JS bug when HTML block is followed by an answer block
parents 1da02fec 498e220b
...@@ -107,7 +107,7 @@ function MentoringBlock(runtime, element) { ...@@ -107,7 +107,7 @@ function MentoringBlock(runtime, element) {
function getChildByName(name) { function getChildByName(name) {
for (var i = 0; i < children.length; i++) { for (var i = 0; i < children.length; i++) {
var child = children[i]; var child = children[i];
if (child && child.name.toString() === name) { if (child && typeof child.name !== 'undefined' && child.name.toString() === name) {
return child; return child;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment