diff --git a/src/stores.ts b/src/stores.ts index bab7dad..7143cba 100644 --- a/src/stores.ts +++ b/src/stores.ts @@ -47,7 +47,7 @@ class QuestionManager { if (options.length <= 0) options = this.availableQuestions; - let idx = Math.random() * options.length; + let idx = Math.floor(Math.random() * options.length); let randomItem = options[idx]; console.log("Setting question", randomItem); this.activeQuestion.set({