aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/github')
-rw-r--r--bridge/github/iterator.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/bridge/github/iterator.go b/bridge/github/iterator.go
index a97ed036..786f0fbf 100644
--- a/bridge/github/iterator.go
+++ b/bridge/github/iterator.go
@@ -214,6 +214,7 @@ func (i *iterator) NextTimelineItem() bool {
return false
}
+ // after NextIssue call it's good to check wether we have some timeline items or not
if len(i.timeline.query.Repository.Issues.Nodes[0].Timeline.Edges) == 0 {
return false
}
@@ -240,6 +241,11 @@ func (i *iterator) NextTimelineItem() bool {
return false
}
+ // (in case github returns something wierd) just for safety: better return a false than a panic
+ if len(i.timeline.query.Repository.Issues.Nodes[0].Timeline.Edges) == 0 {
+ return false
+ }
+
i.reverseTimelineEditNodes()
i.timeline.index = 0
return true