Reset state after quiz
This commit is contained in:
parent
fe519bf80a
commit
777be865f8
|
@ -1,4 +1,4 @@
|
|||
var state = {
|
||||
const defaultState = {
|
||||
style: 'FSCzech',
|
||||
id: null,
|
||||
title: null,
|
||||
|
@ -8,6 +8,8 @@ var state = {
|
|||
success: 0
|
||||
}
|
||||
|
||||
var state = defaultState
|
||||
|
||||
|
||||
function changeView(view) {
|
||||
|
||||
|
@ -249,6 +251,8 @@ function endQuiz() {
|
|||
if (state.interval)
|
||||
clearInterval(state.interval)
|
||||
|
||||
state = defaultState
|
||||
|
||||
console.log('Quiz ended')
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue