Skip to content

Commit

Permalink
eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
barisgul15 committed Nov 20, 2023
1 parent f4d61fe commit d752d92
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions web/ts/course-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ export function addNotifyEventListeners() {
});
}


//The data coming from TUMonline sometimes duplicates contacts of some courses. course.contacts has 5 attributes:
//first_name, last_name, email, main_contact, role.
//All cases considered, the most distinctive among them is e-mail and duplicates are eliminated accordingly.
export function filterUniqueContacts(contacts: any[]) {
export function filterUniqueContacts(contacts) {
const uniqueEmails = new Set();
return contacts.filter(contact => {
return contacts.filter((contact) => {
if (!uniqueEmails.has(contact.email)) {
uniqueEmails.add(contact.email);
return true;
Expand Down

0 comments on commit d752d92

Please sign in to comment.