Skip to content

Commit

Permalink
lib/twitch: Add sender.username check for lastseenUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Apr 14, 2018
1 parent e7ef446 commit 4565354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/twitch.js
Expand Up @@ -70,7 +70,7 @@ class Twitch {
}

async lastseenUpdate (self, sender, text) {
if (!_.isNull(sender)) {
if (!_.isNil(sender) && !_.isNil(sender.username)) {
global.users.set(sender.username, {
time: { message: new Date().getTime() },
is: { subscriber: !_.isNil(sender.subscriber) ? sender.subscriber : false }
Expand Down

0 comments on commit 4565354

Please sign in to comment.