git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
word/multichoice: stop when answers run out
[sheet.git]
/
word
/
multichoice.js
diff --git
a/word/multichoice.js
b/word/multichoice.js
index 761b966dd3cc3976e9affc468e3c661bfc611824..5908fdcbec9f3a2a69967bf1d9111bb4e98e193e 100644
(file)
--- a/
word/multichoice.js
+++ b/
word/multichoice.js
@@
-1,6
+1,8
@@
class WordMultiChoice extends WordQuiz {
next() {
+ if (this.words.length < 4) return;
let word = this.words.shift();
+ if (!word[2]) return this.next();
let form = put(this.form,
'+img[src=$]+ul', `/data/word/en/${word[2]}.jpg`,
);