Skip to content

Commit

Permalink
fix error message on wrong-arity call
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Feb 28, 2012
1 parent ac226c6 commit 229856d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/less/parser.js
Expand Up @@ -228,8 +228,8 @@ less.Parser = function Parser(env) {
this.filename = e.filename || env.filename;
this.index = e.index;
this.line = typeof(line) === 'number' ? line + 1 : null;
this.callLine = e.call && (getLocation(e.call, input) + 1);
this.callExtract = lines[getLocation(e.call, input)];
this.callLine = e.call && (getLocation(e.call, input).line + 1);
this.callExtract = lines[getLocation(e.call, input).line];
this.stack = e.stack;
this.column = col;
this.extract = [
Expand Down
2 changes: 1 addition & 1 deletion lib/less/tree/mixin.js
Expand Up @@ -22,7 +22,7 @@ tree.mixin.Call.prototype = {
rules, mixins[m].eval(env, this.arguments, this.important).rules);
match = true;
} catch (e) {
throw { message: e.message, index: e.index, filename: this.filename, stack: e.stack, call: this.index };
throw { message: e.message, index: this.index, filename: this.filename, stack: e.stack };
}
}
}
Expand Down

0 comments on commit 229856d

Please sign in to comment.