Added check if there is no player data

This commit is contained in:
Alexis
2023-12-08 19:26:39 +01:00
parent 873743d732
commit e2b513253c
2 changed files with 5 additions and 2 deletions

View File

@@ -158,7 +158,8 @@ for (let i = 0; i < markers.length; i++) {
/**
* Add player's position marker
*/
if ( players ) {
if ( players && Object.keys(players).length > 0 ) {
console.log(players)
const playersPosition =[
convertYToScale(players.markerCoords.y),
convertXToScale(players.markerCoords.x)