Skip to content

Conversation

@bradenmacdonald
Copy link
Member

This fixes a JS error that would occur when a PB block contains an HTML child followed by an answer block: TypeError: Cannot read property 'toString' of undefined

The reason for the error is that HTML blocks don't have a name property. This fix is simple. Unfortunately I couldn't figure out how to add a regression test for this, since the workbench runtime doesn't appear to have this bug - only the edx-platform runtime.

Sandbox URL that previously had the issue: http://sandbox2.opencraft.com/courses/course-v1:HGSE+1x+2015/courseware/Week_1_Welcome_and_orientation/Change_Diary_Using_the_Change_Diary/

@Kelketek Kelketek changed the title Fix JS bug when HTML block is followed by an answer black Fix JS bug when HTML block is followed by an answer block Jul 22, 2015
@Kelketek
Copy link
Member

👍

bradenmacdonald added a commit that referenced this pull request Jul 22, 2015
Fix JS bug when HTML block is followed by an answer block
@bradenmacdonald bradenmacdonald merged commit 80f90e3 into master Jul 22, 2015
@bradenmacdonald bradenmacdonald deleted the hgse-bugs-ii branch July 22, 2015 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants