Skip to content

Commit

Permalink
fix(eventsub): check on nil status
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed May 31, 2024
1 parent bea225f commit b799845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/eventsub/internal/manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (c *Manager) SubscribeToNeededEvents(
if (status != nil && len(status.Data) > 0) || (casterErr != nil && casterErr.Status == 409) {
subStatus := "enabled"
subId := uuid.New()
if len(status.Data) > 0 {
if status != nil && len(status.Data) > 0 {
subStatus = status.Data[0].Status
subId = uuid.MustParse(status.Data[0].ID)
}
Expand Down

0 comments on commit b799845

Please sign in to comment.