From fba0a2a2b2a01f1934306bdb523eb037132fc60d Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Mon, 19 Jun 2023 00:23:29 -0400 Subject: [PATCH] Fixed bug in join autocorect - It would add both numbers and the names to the autocorrect --- Server/commands/join.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/commands/join.js b/Server/commands/join.js index 02e0b62..0acd43c 100644 --- a/Server/commands/join.js +++ b/Server/commands/join.js @@ -114,8 +114,8 @@ module.exports = { for (const nodeObject of nodeObjects) { log.DEBUG("Node object: ", nodeObject); for (const presetName in nodeObject.nearbySystems) { - if (!isNaN(presetName)) presetsAvailable.push(nodeObject.nearbySystems[presetName]); - presetsAvailable.push(presetName) + if (!isNaN(presetName)) return presetsAvailable.push(nodeObject.nearbySystems[presetName]); + return presetsAvailable.push(presetName) } }