mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-03-23 21:50:10 +08:00
Fallback to the default "?" avatar if we don't have a hash (fixes #151)
This commit is contained in:
parent
3964af7ade
commit
d1906a2c83
@ -108,6 +108,8 @@ function CSteamUser(community, userData, customurl) {
|
||||
CSteamUser.getAvatarURL = function(hash, size, protocol) {
|
||||
size = size || '';
|
||||
protocol = protocol || 'http://';
|
||||
|
||||
hash = hash || "72f78b4c8cc1f62323f8a33f6d53e27db57c2252"; // The default "?" avatar
|
||||
|
||||
var url = protocol + "steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/" + hash.substring(0, 2) + "/" + hash;
|
||||
if(size == 'full' || size == 'medium') {
|
||||
|
Loading…
Reference in New Issue
Block a user