Skip to content

Commit 50d208f

Browse files
committed
Fix ajax error
1 parent 5c37291 commit 50d208f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Block/Data/Category.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,16 @@ function _prepareLayout()
7474
/** @var $product \Magento\Catalog\Api\Data\ProductInterface */
7575
$category = $this->getCurrentCategory();
7676

77+
if(!$category){
78+
return;
79+
}
80+
7781
$tm->addVariable(
7882
'list',
7983
'category'
8084
);
8185

86+
8287
$titleArray = [];
8388
$breadCrumbs = $this->_catalogData->getBreadcrumbPath();
8489

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"magento/framework": "100.0.*|100.1.*"
1717
},
1818
"type": "magento2-module",
19-
"version": "2.0.1",
19+
"version": "2.0.2",
2020
"license": [
2121
"OSL-3.0",
2222
"AFL-3.0"

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
-->
1010
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
11-
<module name="MagePal_GoogleTagManager" setup_version="2.0.1">
11+
<module name="MagePal_GoogleTagManager" setup_version="2.0.2">
1212
<sequence>
1313
<module name="Magento_Store"/>
1414
</sequence>

0 commit comments

Comments
 (0)