diff --git a/src/navigation/index.js b/src/navigation/index.js index 65628fda1c..e6aadbcf7d 100644 --- a/src/navigation/index.js +++ b/src/navigation/index.js @@ -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); };