From: Mischa POSLAWSKY Date: Thu, 30 Dec 2021 07:04:53 +0000 (+0100) Subject: word/multichoice: stop when answers run out X-Git-Tag: v1.13~56 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/3232c47b5c02deecf8391974323073e82f038c33?hp=7bbf129e06d190145d0a4d9a7d4c7399d2112f88 word/multichoice: stop when answers run out --- diff --git a/word/multichoice.js b/word/multichoice.js index 61a7b5a..5908fdc 100644 --- a/word/multichoice.js +++ b/word/multichoice.js @@ -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,