From c59c95a23179d1c4b3c86f959f16e6ea0f0b3c34 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 26 Jan 2021 13:22:23 +0100 Subject: Whoops --- admin/public/questions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'admin') diff --git a/admin/public/questions.js b/admin/public/questions.js index 32e48bf..ad0bc1a 100644 --- a/admin/public/questions.js +++ b/admin/public/questions.js @@ -52,6 +52,5 @@ function render(index) { document.getElementById("switch").addEventListener("click", () => { chart.destroy(); render(++question_index); - if (question_index + 1 < data.length) question_index++; - else question_index = 0; + if (question_index + 1 >= data.length) question_index = -1; }); -- cgit v1.2.3