dont set meta.config to null

This commit is contained in:
Barış Soner Uşaklı
2017-11-02 18:39:36 -04:00
parent 662f92a4a8
commit 845f01f297

View File

@@ -15,23 +15,19 @@ var Configs = module.exports;
Meta.config = {};
Configs.init = function (callback) {
Meta.config = null;
var config;
async.waterfall([
function (next) {
Configs.list(next);
},
function (config, next) {
cacheBuster.read(function (err, buster) {
if (err) {
return next(err);
}
config['cache-buster'] = 'v=' + (buster || Date.now());
Meta.config = config;
next();
});
function (_config, next) {
config = _config;
cacheBuster.read(next);
},
function (buster, next) {
config['cache-buster'] = 'v=' + (buster || Date.now());
Meta.config = config;
next();
},
], callback);
};