Fix missing username when avatar is 404
This commit is contained in:
@@ -1166,9 +1166,9 @@ define([
|
|||||||
var hexFileName = Util.base64ToHex(secret.channel);
|
var hexFileName = Util.base64ToHex(secret.channel);
|
||||||
var src = Hash.getBlobPathFromHex(hexFileName);
|
var src = Hash.getBlobPathFromHex(hexFileName);
|
||||||
Common.getFileSize(hexFileName, function (e, data) {
|
Common.getFileSize(hexFileName, function (e, data) {
|
||||||
if (e) {
|
if (e || !data) {
|
||||||
displayDefault();
|
displayDefault();
|
||||||
return void console.error(e);
|
return void console.error(e || "404 avatar");
|
||||||
}
|
}
|
||||||
if (typeof data !== "number") { return void displayDefault(); }
|
if (typeof data !== "number") { return void displayDefault(); }
|
||||||
if (Util.bytesToMegabytes(data) > 0.5) { return void displayDefault(); }
|
if (Util.bytesToMegabytes(data) > 0.5) { return void displayDefault(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user