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