From 342de126af7964b53165c41ff39d6073da5654fb Mon Sep 17 00:00:00 2001 From: Darren Date: Sat, 10 Aug 2013 18:31:49 +0100 Subject: [PATCH] settings.json hash generating fix --- server/httphandler.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/httphandler.js b/server/httphandler.js index 91bb4e6..cc69024 100644 --- a/server/httphandler.js +++ b/server/httphandler.js @@ -248,7 +248,7 @@ function generateSettings(request, debug, callback) { settings = cached_settings[debug?'debug':'production']; settings.settings = JSON.stringify(vars); - settings.hash = crypto.createHash('md5').update(cached_settings.settings).digest('hex'); + settings.hash = crypto.createHash('md5').update(settings.settings).digest('hex'); return callback(null, settings); }); @@ -267,7 +267,7 @@ function serveSettings(request, response) { } } - settings = cached_settings[debug?'debug':'production']; + settings = cached_settings[debug ? 'debug' : 'production']; if (settings.settings === '') { generateSettings(request, debug, function (err, settings) { if (err) { -- 2.25.1