Skip to content

Commit 3699921

Browse files
Merge pull request #3170 from thorn0/patch-1
`inline` and `less` imports of the same name = race condition
2 parents 2f1386f + 6985541 commit 3699921

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/less/import-manager.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ module.exports = function(environment) {
5151
callback(null, {rules:[]}, false, null);
5252
}
5353
else {
54-
if (!importManager.files[fullPath]) {
54+
// Inline imports aren't cached here.
55+
// If we start to cache them, please make sure they won't conflict with non-inline imports of the
56+
// same name as they used to do before this comment and the condition below have been added.
57+
if (!importManager.files[fullPath] && !importOptions.inline) {
5558
importManager.files[fullPath] = { root: root, options: importOptions };
5659
}
5760
if (e && !importManager.error) { importManager.error = e; }

0 commit comments

Comments
 (0)