From 7f9b7d522e591aa76c4099223fb40a083097b4a3 Mon Sep 17 00:00:00 2001 From: Pilwon Huh Date: Tue, 1 Oct 2013 21:06:44 -0400 Subject: [PATCH] Bypass missing .cachebust --- lib/server/middleware/cachebust.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/server/middleware/cachebust.js b/lib/server/middleware/cachebust.js index 0092da9..c2f411d 100644 --- a/lib/server/middleware/cachebust.js +++ b/lib/server/middleware/cachebust.js @@ -19,10 +19,13 @@ function _getHash(cb) { } fs.readFile(path.join(_app.dir, '../.cachebust'), 'utf8', function (err, data) { _fileRead = true; - if (err) { return cb(err); } - try { - _cachebusts = JSON.parse(data); - } catch (e) {} + if (err) { + console.error(err.message); + } else { + try { + _cachebusts = JSON.parse(data); + } catch (e) {} + } return cb(null, _cachebusts); }); }