Be sure to callback even on profile failure.

This commit is contained in:
howard-stearns 2017-04-18 12:06:44 -07:00
parent d84dd4ce67
commit 3113dced7b

View file

@ -400,6 +400,7 @@ function getProfilePicture(username, callback) { // callback(url) if successfull
var matched = !error && html.match(/img class="users-img" src="([^"]*)"/);
if (!matched) {
print('Error: Unable to get profile picture for', username, error);
callback('');
return;
}
callback(matched[1]);