Currently, when Multiple Choice questions are subcontent and the parent content does not attach Multiple Choice content when instantiating, but dynamically as needed like Interactive Book, calls to the Question Type contract functions showSolutions and resetTask will crash Multiple Choice. That's because Multiple Choice assumes that it's DOM elements have already been attached to the page, but doesn't check.
When merged in, a guard will be added to the showSolutions function and the resetTask function to prevent crashes.
Currently, when Multiple Choice questions are subcontent and the parent content does not attach Multiple Choice content when instantiating, but dynamically as needed like Interactive Book, calls to the Question Type contract functions
showSolutions
andresetTask
will crash Multiple Choice. That's because Multiple Choice assumes that it's DOM elements have already been attached to the page, but doesn't check.When merged in, a guard will be added to the
showSolutions
function and theresetTask
function to prevent crashes.