Skip to content

Commit

Permalink
Use null check
Browse files Browse the repository at this point in the history
Co-authored-by: Mario Ramundo <ramundomario@gmail.com>
  • Loading branch information
valentin- and ramundomario authored Dec 23, 2021
1 parent 37a9602 commit f1b6e6a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function moveAddressToNewAddressStack(AddressInterface $address, ElementI
}

// set new or changed parent
if ($this->isNewEntity($address) === true || ($address->getParent() && $address->getParent()->getId() !== $newParent->getId())) {
if ($this->isNewEntity($address) === true || $address->getParent()?->getId() !== $newParent->getId()) {
$address->setParent($newParent);
$address->setKey($this->getSaveKeyForMoving($address, $newParent));

Expand Down

0 comments on commit f1b6e6a

Please sign in to comment.