Verified Commit 8372b5c8 authored by Thibaut Broggi's avatar Thibaut Broggi
Browse files

Fix random

parent 6d7a1385
......@@ -110,7 +110,7 @@ window.onload = function() {
let randomElement = function(selector) {
let elems = document.querySelectorAll(selector);
return elems[Math.round(Math.random() * elems.length)];
return elems[Math.trunc(Math.random() * elems.length)];
}
document.getElementById('randomize').onclick = function(e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment