Skip to content

Commit

Permalink
fix soccer null problem (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielruss authored Jun 28, 2024
1 parent 1fb1db2 commit ef586fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions localforageDAO.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export async function restoreResults(results) {
if (typeof results[qid] == "string") {
// in this case get the first input/textarea in the form and fill it in.
let element = formElement.querySelector("input,textarea,select");
// If the element is not on the page
// it could have been dynamically create (think SOCcer...) just return..
if (!element) return
// null handle element, skip if null (load failing when participant is in the middle of unanswered SOCcer questions)
if (element?.type == "radio") {
let selector = `input[value='${results[qid]}']`;
Expand Down

0 comments on commit ef586fb

Please sign in to comment.