Fixing possible to large index

This commit is contained in:
Fabian Stamm 2019-09-11 17:50:32 +02:00
parent 50d1e9ccae
commit 684e193049

View File

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