This commit is contained in:
Fabian Stamm 2019-09-11 17:51:54 +02:00
parent 684e193049
commit 4a108aef06

View File

@ -47,7 +47,7 @@ class QuestionManager {
if (options.length <= 0) if (options.length <= 0)
options = this.availableQuestions; options = this.availableQuestions;
let idx = Math.random() * options.length; let idx = Math.floor(Math.random() * options.length);
let randomItem = options[idx]; let randomItem = options[idx];
console.log("Setting question", randomItem); console.log("Setting question", randomItem);
this.activeQuestion.set({ this.activeQuestion.set({