word/multichoice: stop when answers run out
[sheet.git] / word / multichoice.js
index 61a7b5adbb7950d4c4bbb0161cb27c3dcdb23f13..5908fdcbec9f3a2a69967bf1d9111bb4e98e193e 100644 (file)
@@ -1,5 +1,6 @@
 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,