Skip to content

Commit a048a24

Browse files
committed
Remove useless ext parameter from lookup
1 parent 6c122ab commit a048a24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/view.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@ function View(name, options) {
5959
* @api private
6060
*/
6161

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

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

67+
var ext = path.extname(name);
68+
6769
function lookup(roots, callback) {
6870
var root = roots.shift();
6971
if (!root) {
@@ -117,7 +119,7 @@ View.prototype.lookupMain = function lookupMain(cb) {
117119
var name = path.extname(this.name) == this.ext
118120
? this.name
119121
: this.name + this.ext;
120-
this.lookup(name, this.ext, this.options, function (err, path) {
122+
this.lookup(name, this.options, function (err, path) {
121123
if (err) {
122124
return cb(err);
123125
} else if (!path) {

0 commit comments

Comments
 (0)