Skip to content

Commit

Permalink
hotfix: filter overfiltering
Browse files Browse the repository at this point in the history
  • Loading branch information
SachsenspieltCoding committed Jun 5, 2023
1 parent 244b476 commit 1d21322
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vertretungsapp",
"version": "0.2.1",
"version": "0.2.2",
"author": "Sachsenspielt",
"scripts": {
"dev": "vite dev",
Expand Down
1 change: 1 addition & 0 deletions src/lib/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export function toggleLesson(filter: Filter, lesson: Lesson): boolean {

export function isLessonEnabled(filter: Filter, lesson: Lesson | PlannedLesson): boolean {
const lessonFilter = filter.lessons.find((l) => l.lesson.id === lesson.id);
if(!filter.lessons.find((l) => l.lesson.id === lesson.id)) return true;
return lessonFilter?.enabled ?? false;
}

Expand Down

0 comments on commit 1d21322

Please sign in to comment.