Fix "featureless" structure property quizzing

This commit is contained in:
Thomas A. Christensen II 2022-09-24 19:17:55 -05:00
parent 80b5ab29ed
commit a7d9a0d479

View file

@ -107,17 +107,21 @@
quiz_list.push(`id: ${structure}`); quiz_list.push(`id: ${structure}`);
let questions = [];
if ("features" in props) { if ("features" in props) {
for (feature in props["features"]) { for (feature in props["features"]) {
let questions = feature_question( questions = feature_question(
`${feature} of ${structure}`, `${feature} of ${structure}`,
props["features"][feature] props["features"][feature]
); );
}
} else {
questions = feature_question(structure, props);
}
for (const question of questions) { for (const question of questions) {
quiz_list.push(question); quiz_list.push(question);
} }
}
}
return quiz_list; return quiz_list;
} }