Fix no section showing up when joining a game with no name set

This commit is contained in:
Andrio Celos 2022-10-14 14:03:48 +11:00
parent 0b6ddb39b0
commit 2c2deb5691
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8"/>
<base href="https://questers-rest.andriocelos.net/tableturf/"/>
<script>
document.getElementsByTagName('base')[0].href = window.location.toString().replace(/\/(?:index.html|game\/[^/]*)$/, '/');
document.getElementsByTagName('base')[0].href = window.location.toString().replace(/\/(?:index.html|deckeditor|game\/[^/]*)$/, '/');
</script>
<title>Tableturf Battle</title>
<link rel="stylesheet" href="tableturf.css"/>

View File

@ -147,6 +147,8 @@ function presetGameID(url: string) {
(document.getElementById('gameIDBox') as HTMLInputElement).value = url;
if (playerName)
tryJoinGame(playerName, url, true);
else
showSection('preGame');
}
preGameDeckEditorButton.addEventListener('click', e => {