Skip to content

Commit

Permalink
fix: marathon filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-29 committed Dec 10, 2023
1 parent 51853fc commit 4bb349d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,9 @@ const filterTitleRuns = (run: Activity, title: string) =>
const filterTypeRuns = (run: Activity, type: string) => {
switch (type){
case 'Full Marathon':
return run.type === 'Run' && run.distance > 40000
return (run.type === 'Run' || run.type === 'Trail Run') && run.distance > 40000
case 'Half Marathon':
return run.type === 'Run' && run.distance < 40000 && run.distance > 20000
return (run.type === 'Run' || run.type === 'Trail Run') && run.distance < 40000 && run.distance > 20000
default:
return run.type === type
}
Expand Down

0 comments on commit 4bb349d

Please sign in to comment.