stupid sexy trapdoor

This commit is contained in:
reality 2013-10-24 22:17:10 +00:00
parent a28ec17a6d
commit 956b947a4c

View File

@ -81,7 +81,8 @@ var lastfm = function(dbot) {
}, function(err, res, body) { }, function(err, res, body) {
if(_.has(body, 'error') && body.error == 6) { if(_.has(body, 'error') && body.error == 6) {
callback('no_user', null); callback('no_user', null);
} else if(_.has(body, 'recenttracks') && !_.isUndefined(body.recenttracks.track[0])) { } else if(_.has(body, 'recenttracks') && _.has(body.recenttracks, 'track')
&& !_.isUndefined(body.recenttracks.track[0])) {
callback(null, body.recenttracks.track[0]); callback(null, body.recenttracks.track[0]);
} else { } else {
callback('no_listen', null); callback('no_listen', null);