default to __filename when no filename in env

This commit is contained in:
cloudhead 2010-06-30 13:19:41 +02:00
parent 65de5f2d89
commit 7565305c4d

View File

@ -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
//