default to __filename when no filename in env
This commit is contained in:
parent
65de5f2d89
commit
7565305c4d
@ -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
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user