Skip to content

Commit 3c13863

Browse files
mrtuvntuna2smc
authored andcommitted
Update MagentoImport.php
Update import check
1 parent 954d9d5 commit 3c13863

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/internal/Magento/Framework/Css/PreProcessor/Instruction/MagentoImport.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,15 @@ protected function replace(array $matchedContent, LocalInterface $asset)
143143
if ($moduleName && !$deployOnlyEnabled && !$this->moduleManager->isEnabled($moduleName)) {
144144
continue;
145145
}
146-
147-
if ($moduleName && $deployOnlyEnabled && $this->moduleManager->isEnabled($moduleName)) {
148-
$referenceString = $isReference ? '(reference) ' : '';
149-
$importsContent .= $moduleName
150-
? "@import $referenceString'{$moduleName}::{$resolvedPath}';\n"
151-
: "@import $referenceString'{$matchedFileId}';\n";
146+
147+
if ($moduleName && $deployOnlyEnabled && !$this->moduleManager->isEnabled($moduleName)) {
148+
continue;
152149
}
150+
151+
$referenceString = $isReference ? '(reference) ' : '';
152+
$importsContent .= $moduleName
153+
? "@import $referenceString'{$moduleName}::{$resolvedPath}';\n"
154+
: "@import $referenceString'{$matchedFileId}';\n";
153155
}
154156
} catch (\LogicException $e) {
155157
$this->errorHandler->processException($e);

0 commit comments

Comments
 (0)