mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
default to __filename when no filename in env
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user