Skip to content

Commit

Permalink
Fix import inline. Fixes less#2703
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeapage committed Sep 25, 2015
1 parent f0c454b commit c7a6e8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/less/tree/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,12 @@ Import.prototype.eval = function (context) {
}

if (this.options.inline) {
var contents = new Anonymous(this.root, 0, {filename: this.importedFilename, reference: this.path.currentFileInfo.reference}, true, true, false);
var contents = new Anonymous(this.root, 0,
{
filename: this.importedFilename,
reference: this.path.currentFileInfo && this.path.currentFileInfo.reference
}, true, true, false);

return this.features ? new Media([contents], this.features.value) : [contents];
} else if (this.css) {
var newImport = new Import(this.evalPath(context), features, this.options, this.index);
Expand Down

0 comments on commit c7a6e8d

Please sign in to comment.