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,16 +107,20 @@
quiz_list.push(`id: ${structure}`);
let questions = [];
if ("features" in props) {
for (feature in props["features"]) {
let questions = feature_question(
questions = feature_question(
`${feature} of ${structure}`,
props["features"][feature]
);
for (const question of questions) {
quiz_list.push(question);
}
}
} else {
questions = feature_question(structure, props);
}
for (const question of questions) {
quiz_list.push(question);
}
return quiz_list;