Skip to content

Commit

Permalink
🐛 Fix when no elements in range
Browse files Browse the repository at this point in the history
  • Loading branch information
Hona committed Feb 8, 2023
1 parent dcb894e commit b5ccd0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/UpBlazor.Core/Helpers/IntervalExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UpBlazor.Core.Models.Enums;

namespace UpBlazor.Core.Helpers
Expand Down Expand Up @@ -42,7 +43,7 @@ public static List<DateOnly> GetAllCyclesInRange(this DateTime start, DateTime r
// Cycle hasn't started yet
if (startOfRange > rangeEnd)
{
return null;
return Enumerable.Empty<DateOnly>().ToList();
}

var output = new List<DateOnly>
Expand Down

0 comments on commit b5ccd0c

Please sign in to comment.