mirror of
https://github.com/less/less.js.git
synced 2026-01-23 06:07:56 -05:00
Merge pull request #2609 from mmelvin0/master
Skip missing optional imports
This commit is contained in:
@@ -104,6 +104,7 @@ ImportVisitor.prototype = {
|
||||
var importVisitor = this,
|
||||
inlineCSS = importNode.options.inline,
|
||||
isPlugin = importNode.options.plugin,
|
||||
isOptional = importNode.options.optional,
|
||||
duplicateImport = importedAtRoot || fullPath in importVisitor.recursionDetector;
|
||||
|
||||
if (!context.importMultiple) {
|
||||
@@ -120,6 +121,10 @@ ImportVisitor.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (!fullPath && isOptional) {
|
||||
importNode.skip = true;
|
||||
}
|
||||
|
||||
if (root) {
|
||||
importNode.root = root;
|
||||
importNode.importedFilename = fullPath;
|
||||
|
||||
Reference in New Issue
Block a user