We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdccfed commit f6305ecCopy full SHA for f6305ec
app/code/Magento/Catalog/Model/Layer/Filter/DataProvider/Category.php
@@ -112,8 +112,9 @@ public function getCategory()
112
/** @var CategoryModel|null $category */
113
$category = null;
114
if ($this->categoryId !== null) {
115
- if ($this->coreRegistry->registry('current_category')->getId() == $this->categoryId) {
116
- $category = $this->coreRegistry->registry('current_category');
+ $currentCategory = $this->coreRegistry->registry('current_category');
+ if ($currentCategory !== null && $currentCategory->getId() == $this->categoryId) {
117
+ $category = $currentCategory;
118
} else {
119
$category = $this->categoryFactory->create()
120
->setStoreId(
0 commit comments