Don't log error when a friend's avatar has been deleted

pull/1/head
yflory 5 years ago
parent e75e22fb10
commit a511fccdc2

@ -2087,10 +2087,7 @@ define([
var cryptKey = Hash.encodeBase64(secret.keys && secret.keys.cryptKey); var cryptKey = Hash.encodeBase64(secret.keys && secret.keys.cryptKey);
var src = origin + Hash.getBlobPathFromHex(hexFileName); var src = origin + Hash.getBlobPathFromHex(hexFileName);
common.getFileSize(hexFileName, function (e, data) { common.getFileSize(hexFileName, function (e, data) {
if (e || !data) { if (e || !data) { return void displayDefault(); }
displayDefault();
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(); }
var $img = $('<media-tag>').appendTo($container); var $img = $('<media-tag>').appendTo($container);

Loading…
Cancel
Save