Fixing possible to large index
This commit is contained in:
parent
50d1e9ccae
commit
684e193049
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user