From af3d0481ca3baae13e6ca42525f0b34cc96578bc Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Sat, 21 Jan 2023 18:13:02 +0100 Subject: [PATCH] fix check when exiting, fix #11 --- client/src/lib/game.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/lib/game.svelte b/client/src/lib/game.svelte index 0c00786..ecb414c 100644 --- a/client/src/lib/game.svelte +++ b/client/src/lib/game.svelte @@ -162,7 +162,7 @@ } function check(e: MouseEvent) { - if(twoPlayer) return; + if(!moves.length) return; var confirmed = confirm("Are you sure you want to quit?"); if(!confirmed) return e.preventDefault() || false; }