Fix "featureless" structure property quizzing
This commit is contained in:
parent
80b5ab29ed
commit
a7d9a0d479
1 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue