Skip to content

Commit

Permalink
Use shallow merge in res.view (re balderdashy#3500)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil authored and lennym committed Feb 25, 2016
1 parent 9051b2b commit 57ade9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/hooks/views/res.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ module.exports = function _addResViewMethod(req, res, next) {

// Merge with config views locals
if (sails.config.views.locals) {
_.merge(locals, sails.config.views.locals, _.defaults);
// Formerly a deep merge: `_.merge(locals, sails.config.views.locals, _.defaults);`
// Now shallow- see https://github.com/balderdashy/sails/issues/3500
_.defaults(locals, sails.config.views.locals);
}

// If the path was specified, but invalid
Expand Down

0 comments on commit 57ade9e

Please sign in to comment.