Skip to content

Commit

Permalink
null check for no data from twitch
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobiah committed Mar 30, 2020
1 parent e2ebdd6 commit 0d689dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/notifications/TwitchNotifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class TwitchNotifier {
.then(data => data.json());

// If the stream query has some results, then the user is live
if (response.data.length > 0) {
if (response.data && response.data.length > 0) {
// parse what time the stream started
const startedAt = moment(response.data[0].started_at);

Expand Down

0 comments on commit 0d689dc

Please sign in to comment.