From d69fcbdf052724e0a19d8873974dc03bfb59689e Mon Sep 17 00:00:00 2001 From: Aleksandyr <52937670+stjornleysi@users.noreply.github.com> Date: Mon, 1 Apr 2024 09:45:46 +0300 Subject: [PATCH] Update telegram_support_bot.js --- telegram_support_bot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/telegram_support_bot.js b/telegram_support_bot.js index 4ed23c8..388004b 100644 --- a/telegram_support_bot.js +++ b/telegram_support_bot.js @@ -385,6 +385,7 @@ let dataId = JSON.parse(fs.readFileSync(dir + "/data/dataId.json")); let listTickets = await glpm.getAllItems('Ticket', 5); for(let i = 5; i >= 0; i--){ let ticketId; + if(i > listTickets.length) continue; if(!listTickets) break; ticketId = listTickets[i].id; if(ticketId <= dataId.ticket) continue;