Merge pull request #10238 from howard-stearns/callback-on-profile-failure

Be sure to callback even on profile failure.
This commit is contained in:
Howard Stearns 2017-04-18 13:40:03 -07:00 committed by GitHub
commit 89fa6601b9

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]);