From: Darren Date: Sat, 10 Aug 2013 17:31:49 +0000 (+0100) Subject: settings.json hash generating fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=342de126af7964b53165c41ff39d6073da5654fb;p=KiwiIRC.git settings.json hash generating fix --- 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) {