Skip to content

Commit

Permalink
Fixed partial lookup precedence. Closes #631
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Apr 19, 2011
1 parent 53d4da2 commit ccc39e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/view.js
Expand Up @@ -339,7 +339,10 @@ res._render = function(view, opts, fn, parent, sub){
var orig = view = new View(view, options);

// Try _ prefix ex: ./views/_<name>.jade
if (!view.exists) view = new View(orig.prefixPath, options);
if (partial) {
view = new View(orig.prefixPath, options);
if (!view.exists) view = orig;
}

// Try index ex: ./views/user/index.jade
if (!view.exists) view = new View(orig.indexPath, options);
Expand Down

0 comments on commit ccc39e5

Please sign in to comment.