diff --git a/lib/app/configuration/load.js b/lib/app/configuration/load.js index 0553ec609..76e4b726a 100644 --- a/lib/app/configuration/load.js +++ b/lib/app/configuration/load.js @@ -46,7 +46,7 @@ module.exports = function(sails) { mapOverrides: function(cb) { // Clone the `overrides` that were passed in. - var overrides = _.cloneDeep(sails.config || {}); + var overrides = _.clone(sails.config || {}); // TODO: bring the rconf stuff from bin/sails-lift in here @@ -139,7 +139,7 @@ module.exports = function(sails) { var implicitDefaults = self.defaults(overrides.appPath || process.cwd()); // Extend copy of implicit defaults with user config - var mergedConfig = _.merge(_.cloneDeep(implicitDefaults), overrides); + var mergedConfig = _.merge(_.clone(implicitDefaults), overrides); cb(null, mergedConfig); } diff --git a/lib/app/load.js b/lib/app/load.js index 5576d3fc6..527490eaf 100644 --- a/lib/app/load.js +++ b/lib/app/load.js @@ -31,7 +31,7 @@ module.exports = function(sails) { // Ensure override is an object and clone it (or make an empty object if it's not) configOverride = configOverride || {}; - sails.config = _.cloneDeep(configOverride); + sails.config = _.clone(configOverride); // If host is explicitly specified, set `explicitHost` diff --git a/lib/hooks/userconfig/index.js b/lib/hooks/userconfig/index.js index b97c29dcd..8ec7033f7 100644 --- a/lib/hooks/userconfig/index.js +++ b/lib/hooks/userconfig/index.js @@ -28,7 +28,7 @@ module.exports = function(sails) { sails.log.verbose('Loading app config...'); // Grab reference to mapped overrides - var overrides = _.cloneDeep(sails.config); + var overrides = _.clone(sails.config); // If appPath not specified yet, use process.cwd()