summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Weider <cweider@oofn.net>2012-02-28 18:05:27 -0800
committerChad Weider <cweider@oofn.net>2012-02-28 18:05:27 -0800
commit96ee77d85b9e0880c7986894de16c546f114b3d2 (patch)
tree644ac319d552bc700b13b6abb8e5e1bbfd60563a
parentaf4bd5ca65637dc660a2ccda9f2454180f38f4d3 (diff)
downloadetherpad-lite-96ee77d85b9e0880c7986894de16c546f114b3d2.zip
Check error not stats.
-rw-r--r--node/utils/caching_middleware.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/utils/caching_middleware.js b/node/utils/caching_middleware.js
index 809bb210..2cdb2dfc 100644
--- a/node/utils/caching_middleware.js
+++ b/node/utils/caching_middleware.js
@@ -53,7 +53,7 @@ CachingMiddleware.prototype = new function () {
fs.stat(CACHE_DIR + 'minified_' + cacheKey, function (error, stats) {
var modifiedSince = (req.headers['if-modified-since']
&& new Date(req.headers['if-modified-since']));
- var lastModifiedCache = stats && stats.mtime;
+ var lastModifiedCache = !error && stats.mtime;
if (lastModifiedCache) {
req.headers['if-modified-since'] = lastModifiedCache.toUTCString();
} else {