Browse Source

remove unnecessary double check

jomo 10 năm trước cách đây
mục cha
commit
46d10fdc81
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      lib/response.js

+ 1 - 1
lib/response.js

@@ -58,7 +58,7 @@ module.exports = function(request, response, result) {
   if (result.body) {
   if (result.body) {
     // use Mojang's image hash if available
     // use Mojang's image hash if available
     // use crc32 as a hash function otherwise
     // use crc32 as a hash function otherwise
-    var etag = result.body && result.hash && result.hash.substr(0, 10) || crc(result.body);
+    var etag = result.hash && result.hash.substr(0, 10) || crc(result.body);
     headers.Etag = "\"" + etag + "\"";
     headers.Etag = "\"" + etag + "\"";
 
 
     // handle etag caching
     // handle etag caching