Skip to content

Commit

Permalink
Fix subscriber fetch new sites
Browse files Browse the repository at this point in the history
  • Loading branch information
guarani committed Apr 25, 2024
1 parent 8e020f8 commit 7f47dbc
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ extension StatsSubscribersSummaryData: StatsTimeIntervalData {
let history: [SubscriberData?] = data.map { elements in
guard elements.indices.contains(dateIndex) && elements.indices.contains(countIndex),
let dateString = elements[dateIndex] as? String,
let date = StatsSubscribersSummaryData.parsedDate(from: dateString, for: period),
let count = elements[countIndex] as? Int
let date = StatsSubscribersSummaryData.parsedDate(from: dateString, for: period)
else {
return nil
}

let count = elements[countIndex] as? Int ?? 0

return SubscriberData(date: date, count: count)
}

Expand Down

0 comments on commit 7f47dbc

Please sign in to comment.