Skip to content

Commit a88e3ad

Browse files
committed
Merge pull request #467 from magento-goinc/pr-452
[SWAT] Bug fixes
2 parents b3a13b8 + e61b700 commit a88e3ad

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

app/code/Magento/Review/Controller/Product/ListAjax.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Review\Controller\Product;
77

8+
use Magento\Framework\Exception\LocalizedException;
89
use Magento\Review\Controller\Product as ProductController;
910
use Magento\Framework\Controller\ResultFactory;
1011

@@ -17,9 +18,13 @@ class ListAjax extends ProductController
1718
*/
1819
public function execute()
1920
{
20-
$this->initProduct();
21-
/** @var \Magento\Framework\View\Result\Layout $resultLayout */
22-
$resultLayout = $this->resultFactory->create(ResultFactory::TYPE_LAYOUT);
21+
if (!$this->initProduct()) {
22+
throw new LocalizedException(__('Cannot initialize product'));
23+
} else {
24+
/** @var \Magento\Framework\View\Result\Layout $resultLayout */
25+
$resultLayout = $this->resultFactory->create(ResultFactory::TYPE_LAYOUT);
26+
}
27+
2328
return $resultLayout;
2429
}
2530
}

app/code/Magento/Search/view/frontend/web/form-mini.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ define([
249249

250250
this.responseList.indexList
251251
.on('click', function (e) {
252-
this.responseList.selected = $(e.target);
252+
this.responseList.selected = $(e.currentTarget);
253253
this.searchForm.trigger('submit');
254254
}.bind(this))
255255
.on('mouseenter mouseleave', function (e) {

0 commit comments

Comments
 (0)