improved performance when reloading page

This commit is contained in:
Wenszel
2023-11-22 20:39:05 +01:00
parent fcc6fcde28
commit c999bfca39
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -35,6 +35,7 @@ const Gameboard = () => {
socket.emit('room:data', context.roomId);
socket.on('room:data', data => {
data = JSON.parse(data);
if (data.players == null) return;
// Filling navbar with empty player nick container
while (data.players.length !== 4) {
data.players.push({ name: '...' });