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 6dc0956 commit fedb5a8Copy full SHA for fedb5a8
app/code/Magento/Checkout/Controller/Sidebar/RemoveItem.php
@@ -85,9 +85,11 @@ protected function jsonResponse($error = '')
85
{
86
$response = $this->sidebar->getResponseData($error);
87
88
- $resultPage = $this->resultPageFactory->create();
89
- $block = $resultPage->getLayout()->getBlock('minicart.content')->toHtml();
90
- $response['content'] = $block;
+ if (empty($error)) {
+ $resultPage = $this->resultPageFactory->create();
+ $block = $resultPage->getLayout()->getBlock('minicart.content')->toHtml();
91
+ $response['content'] = $block;
92
+ }
93
94
return $this->getResponse()->representJson(
95
$this->jsonHelper->jsonEncode($response)
0 commit comments