Skip to content

Commit

Permalink
fixup! Allowing variants to be changed to objects
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo-ele committed Apr 15, 2024
1 parent 862977e commit 2227ac3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Resolver/Location/FindParentStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ private function setElementType(ElementInterface $element, DataObject | ElementI

$element->setType(AbstractObject::OBJECT_TYPE_VARIANT);
} elseif (
!$this->saveAsVariant && $element->getType() !== AbstractObject::OBJECT_TYPE_OBJECT
!$this->saveAsVariant
&& $element instanceof AbstractObject
&& $element->getType() === AbstractObject::OBJECT_TYPE_VARIANT
) {
if ($newParent->getType() === AbstractObject::OBJECT_TYPE_VARIANT) {
throw new InvalidInputException(
Expand Down

0 comments on commit 2227ac3

Please sign in to comment.