Permalink
Browse files

refactor res.render() to prevent clobbering "locals"

  • Loading branch information...
1 parent ff1c6f0 commit 6bebe0837fea2eda552495878ff45e945804b129 @tj tj committed Aug 11, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/application.js
  2. +1 −1 lib/response.js
View
@@ -467,8 +467,8 @@ app.render = function(name, options, fn){
// merge app.locals
utils.merge(opts, this.locals);
- // merge options.locals
- if (options.locals) utils.merge(opts, options.locals);
+ // merge options._locals
+ if (options._locals) utils.merge(opts, options._locals);
// merge options
utils.merge(opts, options);
View
@@ -665,7 +665,7 @@ res.render = function(view, options, fn){
}
// merge res.locals
- options.locals = self.locals;
+ options._locals = self.locals;
// default callback to respond
fn = fn || function(err, str){

0 comments on commit 6bebe08

Please sign in to comment.