diff --git a/routes/avatars.js b/routes/avatars.js index 3f54501..47f772e 100644 --- a/routes/avatars.js +++ b/routes/avatars.js @@ -49,7 +49,7 @@ module.exports = function(req, res) { if (err) { logging.error(uuid + " " + err); } - etag = !err && hash && hash.substr(0, 32) || "none"; + etag = image && hash && hash.substr(0, 32) || "none"; var matches = req.headers["if-none-match"] == '"' + etag + '"'; if (image) { var http_status = 200;