Skip to content

Commit

Permalink
more NRE fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremysawesome committed Oct 2, 2015
1 parent fcc2425 commit c6b7a1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Nagger.Services/TimeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ public int IntervalsSinceTime(DateTime startTime)
public int IntervalsSinceLastRecord(bool justToday = true)
{
var lastRecord = GetLastTimeEntry(true);
if (lastRecord == null) return 0;
if (justToday && lastRecord.TimeRecorded < DateTime.Today) return 0;
return lastRecord == null ? 0 : IntervalsSinceTime(lastRecord.TimeRecorded);
return IntervalsSinceTime(lastRecord.TimeRecorded);
}

public IEnumerable<string> GetRecentlyRecordedTaskIds(int limit)
Expand Down

0 comments on commit c6b7a1e

Please sign in to comment.