From 3232c47b5c02deecf8391974323073e82f038c33 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 30 Dec 2021 08:04:53 +0100 Subject: [PATCH] word/multichoice: stop when answers run out --- word/multichoice.js | 1 + 1 file changed, 1 insertion(+) 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, -- 2.30.0