fix navigation

v1.18.x
Barış Soner Uşaklı 6 years ago
parent 038f97b0f5
commit 5ef708d765

@ -2,6 +2,7 @@
var async = require('async');
var nconf = require('nconf');
var _ = require('lodash');
var admin = require('./admin');
var translator = require('../translator');
@ -10,7 +11,7 @@ var navigation = module.exports;
navigation.get = function (callback) {
if (admin.cache) {
return callback(null, admin.cache);
return callback(null, _.cloneDeep(admin.cache));
}
async.waterfall([
@ -33,8 +34,7 @@ navigation.get = function (callback) {
});
admin.cache = data;
next(null, data);
next(null, _.cloneDeep(admin.cache));
},
], callback);
};

Loading…
Cancel
Save