Skip to content

Commit

Permalink
Merge pull request #2609 from mmelvin0/master
Browse files Browse the repository at this point in the history
Skip missing optional imports
  • Loading branch information
lukeapage committed Sep 24, 2015
2 parents 1f624bd + d4b9004 commit dac026a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/less/visitors/import-visitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -120,6 +121,10 @@ ImportVisitor.prototype = {
}
}

if (!fullPath && isOptional) {
importNode.skip = true;
}

if (root) {
importNode.root = root;
importNode.importedFilename = fullPath;
Expand Down

0 comments on commit dac026a

Please sign in to comment.