added null check on send property of res
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports =
|
||||
FileHandler.getFile bucket, key, {format:format,style:style}, (err, fileStream)->
|
||||
if err?
|
||||
logger.err err:err, key:key, bucket:bucket, format:format, style:style, "problem getting file"
|
||||
res.send 500
|
||||
res?.send? 500
|
||||
else if req.query.cacheWarm
|
||||
logger.log key:key, bucket:bucket, format:format, style:style, "request is only for cache warm so not sending stream"
|
||||
res.send 200
|
||||
|
||||
Reference in New Issue
Block a user