From 5ef708d7655132a88a6448df5bedec9ac4798793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 18 Oct 2018 22:33:23 -0400 Subject: [PATCH] fix navigation --- src/navigation/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); };