Skip to content

Commit 951fcf5

Browse files
🐛 Fix types in #249
1 parent 1a286bd commit 951fcf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/notifme.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ export const sendNotification = async (message: string) => {
331331
if (getSecret("NOTIFICATION_TELEGRAM") && getSecret("NOTIFICATION_TELEGRAM_BOT_KEY")) {
332332
console.log("Sending Telegram");
333333
try {
334-
const chatIds = getSecret("NOTIFICATION_TELEGRAM_CHAT_ID").split(",");
334+
const chatIds = getSecret("NOTIFICATION_TELEGRAM_CHAT_ID")?.split(",") ?? [];
335335
for (const chatId of chatIds) {
336336
await axios.post(
337337
`https://api.telegram.org/bot${getSecret("NOTIFICATION_TELEGRAM_BOT_KEY")}/sendMessage`,

0 commit comments

Comments
 (0)