diff --git a/lib/less/parser.js b/lib/less/parser.js index b7cbde4..14b7fba 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -170,7 +170,7 @@ less.Parser = function Parser(env) { } } - this.env = env || {}; + this.env = env = env || {}; // The optimization level dictates the thoroughness of the parser, // the lower the number, the less nodes it will create in the tree. @@ -178,6 +178,8 @@ less.Parser = function Parser(env) { // the individual nodes in the tree. this.optimization = ('optimization' in this.env) ? this.env.optimization : 1; + this.env.filename = this.env.filename || __filename; + // // The Parser //