mirror of
https://github.com/less/less.js.git
synced 2026-01-22 21:58:14 -05:00
optional imports
should fix https://github.com/less/less.js/issues/2145
This commit is contained in:
@@ -40,12 +40,14 @@ module.exports = function(environment) {
|
||||
importManager.queue.splice(importManager.queue.indexOf(path), 1); // Remove the path from the queue
|
||||
|
||||
var importedEqualsRoot = fullPath === importManager.rootFilename;
|
||||
|
||||
if (importOptions.optional && e) {
|
||||
callback(null, {rules:[]}, false, null);
|
||||
}
|
||||
else {
|
||||
importManager.files[fullPath] = root;
|
||||
|
||||
if (e && !importManager.error) { importManager.error = e; }
|
||||
|
||||
callback(e, root, importedEqualsRoot, fullPath);
|
||||
}
|
||||
};
|
||||
|
||||
var newFileInfo = {
|
||||
|
||||
Reference in New Issue
Block a user