Skip to content

Commit 104ba03

Browse files
committed
MC-15763: Introduce critical CSS scope loaded through head
- Stabilization
1 parent 6913ccd commit 104ba03

File tree

2 files changed

+5
-6
lines changed
  • app/code/Magento/Theme/Block/Html/Header
  • lib/internal/Magento/Framework/View/Page/Config/Reader

2 files changed

+5
-6
lines changed

app/code/Magento/Theme/Block/Html/Header/CriticalCss.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ public function getCriticalCssData()
5353
$asset = $this->assetRepo->createAsset($this->filePath, ['_secure' => 'false']);
5454
$content = $asset->getContent();
5555
} catch (NotFoundException $e) {
56-
throw new LocalizedException(__(
57-
'Cannot get critical css file data: "%1"',
58-
$e->getMessage()
59-
));
56+
$content = '';
6057
};
6158

6259
return $content;

lib/internal/Magento/Framework/View/Page/Config/Reader/Head.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Head implements Layout\ReaderInterface
3434
/**#@-*/
3535

3636
/**
37-
* {@inheritdoc}
37+
* @inheritdoc
3838
*/
3939
public function getSupportedNodes()
4040
{
@@ -63,7 +63,9 @@ protected function addContentTypeByNodeName(Layout\Element $node)
6363
}
6464

6565
/**
66-
* {@inheritdoc}
66+
* @param Layout\Reader\Context $readerContext
67+
* @param Layout\Element $headElement
68+
* @return $this|Layout\ReaderInterface
6769
*/
6870
public function interpret(
6971
Layout\Reader\Context $readerContext,

0 commit comments

Comments
 (0)