Skip to content

Commit

Permalink
fix(meal-gap): exclude meals based on start/end cut-offs (V4-1269)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashroch committed Oct 1, 2024
1 parent 5f5fcce commit 7ad10e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/common/src/surveys/meal-time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export function resolveMealGaps(meals: MealState[], prompt: Prompts['meal-gap-pr

if (
minutesBeforeMeal(meal.time, nextMeal.time) > gap
&& isMealAfter(meal.time, toMealTime(startTime))
&& isMealBefore(nextMeal.time, toMealTime(endTime))
&& !meal.flags.includes('no-meals-between')
) {
return [meal, nextMeal];
Expand Down

0 comments on commit 7ad10e6

Please sign in to comment.