From dabe2a1ae305fa806cf1c38773e6e50e018ca067 Mon Sep 17 00:00:00 2001 From: Santiago Forero Date: Thu, 16 Sep 2021 15:46:28 -0500 Subject: [PATCH] add break in leaderboard command --- commands/leaderboard.js | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/leaderboard.js b/commands/leaderboard.js index 586c329..90976ab 100644 --- a/commands/leaderboard.js +++ b/commands/leaderboard.js @@ -17,6 +17,7 @@ module.exports = { let text = "" for(let i = 0; i < 5; i++) { + if(data === undefined) break text += `${i + 1}. ${data[i].ID} (${data[i].data} cm) ` }