Handle a case where AvailableDrops returns no campaigns

This commit is contained in:
DevilXD
2023-10-16 20:53:24 +02:00
parent 163a056b33
commit f990aeea38

View File

@@ -261,7 +261,7 @@ class Channel:
)
stream.drops_enabled = any(
bool(c["timeBasedDrops"])
for c in available_drops["data"]["channel"]["viewerDropCampaigns"]
for c in (available_drops["data"]["channel"]["viewerDropCampaigns"] or [])
)
return stream