do not re-import the re-entry file. Fixes #1484

This commit is contained in:
Luke Page
2013-10-17 18:04:56 +01:00
parent d8d936862d
commit 145406b539

View File

@@ -48,7 +48,8 @@ less.Parser = function Parser(env) {
furthest, // furthest index the parser has gone to
chunks, // chunkified input
current, // index of current chunk, in `input`
parser;
parser,
rootFilename = env.filename;
// Top parser on an import tree must be sure there is one "env"
// which will then be passed around by reference.
@@ -70,7 +71,7 @@ less.Parser = function Parser(env) {
var fileParsedFunc = function (e, root, fullPath) {
parserImports.queue.splice(parserImports.queue.indexOf(path), 1); // Remove the path from the queue
var importedPreviously = fullPath in parserImports.files;
var importedPreviously = fullPath in parserImports.files || fullPath === rootFilename;
parserImports.files[fullPath] = root; // Store the root