Skip to content

Commit fedb5a8

Browse files
author
Sergey Semenov
committed
MAGETWO-21349: Advanced Mini Cart
1 parent 6dc0956 commit fedb5a8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ protected function jsonResponse($error = '')
8585
{
8686
$response = $this->sidebar->getResponseData($error);
8787

88-
$resultPage = $this->resultPageFactory->create();
89-
$block = $resultPage->getLayout()->getBlock('minicart.content')->toHtml();
90-
$response['content'] = $block;
88+
if (empty($error)) {
89+
$resultPage = $this->resultPageFactory->create();
90+
$block = $resultPage->getLayout()->getBlock('minicart.content')->toHtml();
91+
$response['content'] = $block;
92+
}
9193

9294
return $this->getResponse()->representJson(
9395
$this->jsonHelper->jsonEncode($response)

0 commit comments

Comments
 (0)