Skip to content

Commit 91f2321

Browse files
committed
ACP2E-2909: dynamic-rows.js:658 Uncaught TypeError: dataRecord.slice while editing bundle products
- Revert back the code.
1 parent 6e85800 commit 91f2321

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/code/Magento/Bundle/Model/Product/SaveHandler.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,12 @@ public function execute($entity, $arguments = [])
9595
{
9696
/** @var OptionInterface[] $bundleProductOptions */
9797
$bundleProductOptions = $entity->getExtensionAttributes()->getBundleProductOptions() ?: [];
98-
$existingBundleProductOptions = $this->optionRepository->getList($entity->getSku());
9998
//Only processing bundle products.
100-
if ($entity->getTypeId() !== Type::TYPE_CODE ||
101-
(empty($bundleProductOptions) && empty($existingBundleProductOptions))
102-
) {
99+
if ($entity->getTypeId() !== Type::TYPE_CODE || empty($bundleProductOptions)) {
103100
return $entity;
104101
}
105102

103+
$existingBundleProductOptions = $this->optionRepository->getList($entity->getSku());
106104
$existingOptionsIds = !empty($existingBundleProductOptions)
107105
? $this->getOptionIds($existingBundleProductOptions)
108106
: [];

0 commit comments

Comments
 (0)