Skip to content

Commit

Permalink
Merge pull request #1766 from seven-phases-max/undefined-var-in-js-fix
Browse files Browse the repository at this point in the history
Improved error message for undefined variable in js eval statement.
  • Loading branch information
lukeapage committed Dec 28, 2013
2 parents 479827b + 34f54cf commit 3a0f97e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/less/tree/variable.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
tree.Variable = function (name, index, currentFileInfo) {
this.name = name;
this.index = index;
this.currentFileInfo = currentFileInfo;
this.currentFileInfo = currentFileInfo || {};
};
tree.Variable.prototype = {
type: "Variable",
Expand Down
3 changes: 3 additions & 0 deletions test/less/errors/javascript-undefined-var.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.scope {
@a: `@{b}`;
}
4 changes: 4 additions & 0 deletions test/less/errors/javascript-undefined-var.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NameError: variable @b is undefined in {path}javascript-undefined-var.less on line 2, column 15:
1 .scope {
2 @a: `@{b}`;
3 }

0 comments on commit 3a0f97e

Please sign in to comment.