Skip to content

Commit

Permalink
fix: Skip graphs if contribution graph returns null (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder1 authored Dec 1, 2022
1 parent 793a374 commit 4cb66fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ function getContributionDates(array $contributionGraphs): array
if (!empty($graph->errors)) {
throw new AssertionError($graph->data->errors[0]->message, 502);
}
if (empty($graph)) {
continue;
}
$weeks = $graph->data->user->contributionsCollection->contributionCalendar->weeks;
foreach ($weeks as $week) {
foreach ($week->contributionDays as $day) {
Expand Down

0 comments on commit 4cb66fe

Please sign in to comment.