Skip to content

Commit 852c4be

Browse files
updating black list matching method
1 parent 9e62de0 commit 852c4be

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/pages/nuevo-empleo.astro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,15 @@ for (const key in categories) {
225225

226226
function isBlacklisted(data: any) {
227227
const contactFields = [
228-
data.applyEmail.toLowerCase(),
229-
data.applyTelegramUser.toLowerCase(),
230-
data.applyPhone.toLowerCase(),
228+
data.applyEmail.toLowerCase().trim(),
229+
data.applyTelegramUser.toLowerCase().trim(),
230+
data.applyPhone.toLowerCase().trim(),
231231
];
232232

233+
const lowerBlacklist = blacklist.map((item) => item.toLowerCase().trim());
234+
233235
for (const field of contactFields) {
234-
if (field && blacklist.includes(field.toLowerCase())) {
236+
if (field && lowerBlacklist.includes(field)) {
235237
return true;
236238
}
237239
}

0 commit comments

Comments
 (0)