Skip to content

Commit 4cb66fe

Browse files
authored
fix: Skip graphs if contribution graph returns null (#364)
1 parent 793a374 commit 4cb66fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stats.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ function getContributionDates(array $contributionGraphs): array
198198
if (!empty($graph->errors)) {
199199
throw new AssertionError($graph->data->errors[0]->message, 502);
200200
}
201+
if (empty($graph)) {
202+
continue;
203+
}
201204
$weeks = $graph->data->user->contributionsCollection->contributionCalendar->weeks;
202205
foreach ($weeks as $week) {
203206
foreach ($week->contributionDays as $day) {

0 commit comments

Comments
 (0)