Fix types and condition

This commit is contained in:
2025-11-12 11:50:01 +02:00
parent 5757c44e12
commit 2c0634f444

View File

@@ -14,9 +14,9 @@ export default async function sendOpenJobsEmails() {
const doctorAccounts = await getDoctorAccounts();
const doctorEmails = doctorAccounts
.map(({ email }) => email)
.filter((email) => !!email);
.filter((email): email is string => !!email);
if (doctorEmails !== null) {
if (doctorEmails.length === 0) {
return [];
}