Skip to content

Commit

Permalink
add: return false if newNodes is undefined or length === 0
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenjohanson committed Nov 18, 2024
1 parent fa9c3b1 commit 0411b52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teammapper-backend/src/map/controllers/maps.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class MapsGateway implements OnGatewayDisconnect {
request.mapId,
request.nodes
)
if (newNodes.length === 0) return false
if (!newNodes || newNodes.length === 0) return false

this.server.to(request.mapId).emit('nodesAdded', {
clientId: client.id,
Expand Down

0 comments on commit 0411b52

Please sign in to comment.