Skip to content

Commit

Permalink
Remove useless ext parameter from lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
aredridel committed May 19, 2015
1 parent 6c122ab commit a048a24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ function View(name, options) {
* @api private
*/

View.prototype.lookup = function lookup(name, ext, options, cb) {
View.prototype.lookup = function lookup(name, options, cb) {
var roots = [].concat(this.root);

debug('lookup "%s"', name);

var ext = path.extname(name);

function lookup(roots, callback) {
var root = roots.shift();
if (!root) {
Expand Down Expand Up @@ -117,7 +119,7 @@ View.prototype.lookupMain = function lookupMain(cb) {
var name = path.extname(this.name) == this.ext
? this.name
: this.name + this.ext;
this.lookup(name, this.ext, this.options, function (err, path) {
this.lookup(name, this.options, function (err, path) {
if (err) {
return cb(err);
} else if (!path) {
Expand Down

0 comments on commit a048a24

Please sign in to comment.