diff --git a/app.js b/app.js index 7ab7594..a476505 100644 --- a/app.js +++ b/app.js @@ -183,8 +183,14 @@ function initChronoPage() { return; } - if (!match.result && match.phase === "cube") { + const goToCubePage = () => { + dirty = true; + persistMatch(); replaceTo("cube.html"); + }; + + if (!match.result && match.phase === "cube") { + goToCubePage(); return; } @@ -265,6 +271,10 @@ function initChronoPage() { requestBlockClosure(match, "Cloture manuelle de la partie demandee par l'arbitre."); dirty = true; + if (!match.result && match.phase === "cube") { + goToCubePage(); + return; + } render(); }); @@ -338,6 +348,10 @@ function initChronoPage() { } dirty = true; + if (!match.result && match.phase === "cube") { + goToCubePage(); + return; + } render(); } @@ -350,7 +364,7 @@ function initChronoPage() { } if (match.phase !== "block") { - navigateTo("cube.html"); + goToCubePage(); return; } @@ -432,8 +446,7 @@ function initChronoPage() { } if (!match.result && match.phase === "cube") { - persistMatch(); - navigateTo("cube.html"); + goToCubePage(); return; } @@ -490,8 +503,7 @@ function initChronoPage() { } if (!match.result && match.phase === "cube") { - persistMatch(); - navigateTo("cube.html"); + goToCubePage(); return; }