slashwarm / elte-orarend

Modern órarendkészítés ELTE hallgatóknak, egyenesen a legfrissebb, Tanulmányi Osztály adatbázisából lekérdezett adatokkal.
https://gernyimark.web.elte.hu/orarend/
MIT License
11 stars 3 forks source link

Can't remove class from search result calendar, when class is not part of search results #15

Open UnicodeError0041 opened 2 weeks ago

UnicodeError0041 commented 2 weeks ago

Description

When you show your own classes in the search results calendar and hover over one of them, a popup tells you to click if you want to remove it. But, if that class isn't part of the current search results, it won't actually get removed, and you’ll see an error in the console.

Error in the console:

Uncaught TypeError: Cannot read properties of undefined (reading 'id')
    at index-4NE0Ez8N.js:405:20063
    at Array.find (<anonymous>)
    at O (index-4NE0Ez8N.js:405:20046)
    at h (index-4NE0Ez8N.js:405:20310)
    at vt0.q (index-4NE0Ez8N.js:163:1199)
    at H00.trigger (index-4NE0Ez8N.js:141:120717)
    at Ot0.handleSegClick (index-4NE0Ez8N.js:141:204114)
    at HTMLDivElement.<anonymous> (index-4NE0Ez8N.js:141:76463)

Steps to reproduce

There are many ways to reproduce, here is one:

1) Search for IP-18DM1E in the 2022-2023-1 semester. 2) Add the only class to own timetable. 3) Search for IP-18cAN2E in the 2022-2023-1 semester. 4) Add the only class to own timetable. 5) Make sure your own classes are shown in the search results calendar. 6) Attempt to remove your IP-18DM1E class by clicking on it in the search results.

You can remove your IP-18DM1E class in any other way, and you can remove your IP-18cAN2E class by clicking it in the search result calendar.

slashwarm commented 2 weeks ago

@palyikris ez a te gyereked, ha van kedved nyugodtan próbálkozz vele.