ideaaward / badge-builder

Other
2 stars 2 forks source link

Answer checking bug #96

Closed deadlyfingers closed 8 years ago

deadlyfingers commented 8 years ago

Bug needs fixed: TypeError: Cannot read property 'toLowerCase' of undefined helpers.js:51

deadlyfingers commented 8 years ago

Recreate steps: create a quiz with multiple sections and text-input quiz elements.

deadlyfingers commented 8 years ago

If we check only against the page answers then the 'undefined' checks will not be needed for elements with unique properties. https://github.com/vjrantal/badge-builder/blob/5625b542724d25d96f193e7d0b2895483604bbd8/server/routes/helpers.js#L19 @vjrantal @liliankasem thoughts?

deadlyfingers commented 8 years ago

Got a quick fix in for now with an undefined check on userAnswer

var userAnswer = answers[id];
if (userAnswer) {
  // switch
}
deadlyfingers commented 8 years ago

@liliankasem I had to fix this quickly as it was blocking the new drag and drop element. The quick fix I mentioned will be in next PR.

liliankasem commented 8 years ago

Cool, that's fine :)