diff --git a/src/elements/conditions/ElementCondition.php b/src/elements/conditions/ElementCondition.php index 666797f9f38..4db897b43ec 100644 --- a/src/elements/conditions/ElementCondition.php +++ b/src/elements/conditions/ElementCondition.php @@ -73,7 +73,10 @@ public function __construct(?string $elementType = null, array $config = []) throw new InvalidConfigException("Invalid element type: $elementType"); } - $this->elementType = $elementType; + if ($elementType !== null) { + $this->elementType = $elementType; + } + parent::__construct($config); }