fix check connection
This commit is contained in:
parent
77084c3aff
commit
c8beb839af
@ -161,6 +161,7 @@ const GamePage: FunctionComponent<{
|
||||
if (!game || isSpectator || !userKey) {
|
||||
return;
|
||||
}
|
||||
if (Util.checkConnectionAndMaybeAlert(context)) return;
|
||||
if (game.mancalaGame.getPlayerIdByIndex(index) !== userKey) {
|
||||
notyf.error(context.texts.UCanOnlyPlayYourOwnPits);
|
||||
return;
|
||||
@ -174,7 +175,6 @@ const GamePage: FunctionComponent<{
|
||||
notyf.error(context.texts.UMustWaitUntilCurrentMoveComplete);
|
||||
return;
|
||||
}
|
||||
if(Util.checkConnectionAndMaybeAlert(context)) return;
|
||||
if (!boardViewModel) return;
|
||||
//TODO: this check should be in mancala.js
|
||||
if (pit.stoneCount === 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user