Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Reqwey committed Nov 8, 2022
1 parent 3375348 commit 33490a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,12 @@ async function createWindow() {
socket.on('disconnect', async () => {
if (!global.gameStarted)
await handleDisconnectInRoom(player, io)
else
await handleDisconnectInGame(player, io)
})

socket.on('leave_game', async () => {
socket.disconnect()
await handleDisconnectInGame(player, io)
})

Expand Down
2 changes: 1 addition & 1 deletion renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function gameJoin(username) {
socket.emit('leave_game')
Swal.fire({
title: 'Game Over!',
html: `<p style="display: inline">You were defeated by</p><p style="display: inline" class="reqplayer color${player.color}">${player.username}</p>`,
html: `<p style="display: inline">You were defeated by </p><p style="display: inline" class="reqplayer color${player.color}">${player.username}</p>`,
icon: 'warning',
showDenyButton: true,
showCancelButton: false,
Expand Down

0 comments on commit 33490a2

Please sign in to comment.