From 0947be3687584455668da923a754af19b21b3175 Mon Sep 17 00:00:00 2001 From: Sigrid Elnan Date: Tue, 23 Jul 2024 11:55:55 +0200 Subject: [PATCH] Allow to filter with 0 --- frontend/src/hooks/staffing/useConsultantsFilter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/hooks/staffing/useConsultantsFilter.ts b/frontend/src/hooks/staffing/useConsultantsFilter.ts index 9376b363..416a066d 100644 --- a/frontend/src/hooks/staffing/useConsultantsFilter.ts +++ b/frontend/src/hooks/staffing/useConsultantsFilter.ts @@ -175,9 +175,9 @@ function experienceRange( end: parseInt(experienceTo), }; if ( - (!experienceRange.start || + (Number.isNaN(experienceRange.start) || consultant.yearsOfExperience >= experienceRange.start) && - (!experienceRange.end || + (Number.isNaN(experienceRange.end) || consultant.yearsOfExperience <= experienceRange.end) ) return true;